diff --git a/app/controllers/origami/payments_controller.rb b/app/controllers/origami/payments_controller.rb index bdae0f0e..8166aa49 100644 --- a/app/controllers/origami/payments_controller.rb +++ b/app/controllers/origami/payments_controller.rb @@ -28,9 +28,10 @@ class Origami::PaymentsController < BaseOrigamiController memberaction = MembershipAction.find_by_membership_type("get_all_member_account") merchant_uid = memberaction.merchant_account_id.to_s + auth_token = memberaction.auth_token.to_s url = membership.gateway_url.to_s + memberaction.gateway_url.to_s - response = HTTParty.get(url, :body => { membership_id: @customer.membership_id,merchant_uid:merchant_uid}.to_json, + response = HTTParty.get(url, :body => { membership_id: @customer.membership_id,merchant_uid:merchant_uid,auth_token:auth_token}.to_json, :headers => { 'Content-Type' => 'application/json', 'Accept' => 'application/json' diff --git a/app/models/sale_payment.rb b/app/models/sale_payment.rb index 72260344..029afdf9 100644 --- a/app/models/sale_payment.rb +++ b/app/models/sale_payment.rb @@ -256,10 +256,10 @@ class SalePayment < ApplicationRecord membership = MembershipSetting.find_by_membership_type("paypar_url") memberaction = MembershipAction.find_by_membership_type("rebate") campaign_type_id = memberaction.additional_parameter["campaign_type_id"] - app_token = membership.auth_token.to_s + auth_token = memberaction.auth_token.to_s url = membership.gateway_url.to_s + memberaction.gateway_url.to_s response = HTTParty.post(url, :body => { generic_customer_id:generic_customer_id ,total_amount: total_amount,campaign_type_id: campaign_type_id, - receipt_no: receipt_no}.to_json, + receipt_no: receipt_no,auth_token:auth_token}.to_json, :headers => { 'Content-Type' => 'application/json', 'Accept' => 'application/json' diff --git a/dump.rdb b/dump.rdb index a7b34902..9ce916ed 100644 Binary files a/dump.rdb and b/dump.rdb differ