add auth_token
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user