Coupon / Voucher data change
This commit is contained in:
@@ -22,7 +22,7 @@ class Origami::VoucherController < BaseOrigamiController
|
|||||||
def create
|
def create
|
||||||
cash = params[:amount]
|
cash = params[:amount]
|
||||||
sale_id = params[:sale_id]
|
sale_id = params[:sale_id]
|
||||||
sale_id = params[:refnumber]
|
voucher_no = params[:refnumber]
|
||||||
if(Sale.exists?(sale_id))
|
if(Sale.exists?(sale_id))
|
||||||
customer_data= Customer.find_by_customer_id(sale_data.customer_id)
|
customer_data= Customer.find_by_customer_id(sale_data.customer_id)
|
||||||
if customer_data
|
if customer_data
|
||||||
@@ -37,11 +37,12 @@ class Origami::VoucherController < BaseOrigamiController
|
|||||||
auth_token = member_actions.auth_token.to_s
|
auth_token = member_actions.auth_token.to_s
|
||||||
# membership_data = SalePayment.get_paypar_account(url,membership_setting.auth_token,@membership_id,@campaign_type_id,merchant_uid,auth_token)
|
# membership_data = SalePayment.get_paypar_account(url,membership_setting.auth_token,@membership_id,@campaign_type_id,merchant_uid,auth_token)
|
||||||
# if membership_data["status"]==true
|
# if membership_data["status"]==true
|
||||||
|
# app_token: token,membership_id:membership_id,
|
||||||
|
# campaign_type_id:campaign_type_id,merchant_uid:merchant_uid,
|
||||||
|
# auth_token:auth_token
|
||||||
begin
|
begin
|
||||||
response = HTTParty.get(url,
|
response = HTTParty.get(url,
|
||||||
:body => { app_token: token,membership_id:membership_id,
|
:body => { voucher_no: voucher_no,membership_id:membership_id
|
||||||
campaign_type_id:campaign_type_id,merchant_uid:merchant_uid,
|
|
||||||
auth_token:auth_token
|
|
||||||
}.to_json,
|
}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
|
|||||||
Reference in New Issue
Block a user