From 3db3b8c7e7edcde7650d7ec7f3ac521c2e62bebd Mon Sep 17 00:00:00 2001 From: Moe Su Date: Tue, 13 Jun 2017 19:01:14 +0630 Subject: [PATCH] add auth_token --- .../origami/payments_controller.rb | 3 ++- app/models/sale_payment.rb | 4 ++-- dump.rdb | Bin 22659 -> 22762 bytes 3 files changed, 4 insertions(+), 3 deletions(-) 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 a7b3490249f64dc90e8b1f51e3ee17691505015e..9ce916eda38f8373c8dd26cf3de8976b140fd4ee 100644 GIT binary patch delta 461 zcmWO1ziSgw902fly_j4tDs)qbBxe(;!wc{Cd*6UaL?~n`;$jKdd-v`+)OM(K6hS8! zQLdvxhbU6HlllX9w{E&P_Xs$+h?C$T_CNT19v=oj4})i9Y4ZK*t-sOzd%43~`PP@U zr_aYP&fJ-Fx}6xIyAeXo;#c@&kXq`sw*pIL01Lwf21XP%mO0B^9xBCX@v=dRBg)sf zbV7sIPFkwGvm~PwK&QREPPUV$yScla?p_>G0h&u`BpEW$ibHP`ZEt)!Zg-o8um}GR zf}})m>RDOr1eYEr=QjS-vP7cBWec1$k{gk{ZBdfj%*Z@>A1Kn>tD~~b6rp^mIZ(># z)75d%Lo%t*yKyytHEnv38k9_CF|`~EPXJrKycsK-8lrO#EE}J%M-}2Vu41Ek>V-Gd zTD1&|mS;NCCe5cqSy1;wD`C%X)Q>ALEI=#g;&BK z!_UQPc>P)=a*k8t8D4P>;*~S~N2_1wqjdyxydE;(_Hxjc(la5MNWqA~ejraKWynE_ Vl|20LEj+jx{l0Ou-MCe>*=x!a)ckA_z9x=+5p=qj$x{lp^R0 zC}U}H#bH9sE|{QQL{p~l5yZhpd;!Hm{Jy7i@8H}!B%{iFT6-;j`