update rebate and update api

This commit is contained in:
Aung Myo
2017-11-14 18:30:57 +06:30
parent f927d99807
commit 28dbb75774
8 changed files with 39 additions and 32 deletions

View File

@@ -85,7 +85,7 @@ class SalePayment < ApplicationRecord
}.to_json,
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
'Accept' => 'application/json; version=2'
}, :timeout => 10
)
rescue Net::OpenTimeout
@@ -120,17 +120,18 @@ class SalePayment < ApplicationRecord
# Control for Paypar Cloud
begin
response = HTTParty.post(url,
:body => { generic_customer_id:membership_id,
:body => { membership_id:membership_id,
total_amount: redeem_prices,
total_sale_transaction_amount: sale_data.grand_total,
redeem_amount:received_amount,
receipt_no:sale_data.receipt_no,
campaign_type_id:campaign_type_id,
account_no:"",merchant_uid:merchant_uid,
account_no:"",
merchant_uid:merchant_uid,
auth_token:auth_token}.to_json,
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
'Accept' => 'application/json; version=2'
},
:timeout => 10
)
@@ -399,7 +400,7 @@ class SalePayment < ApplicationRecord
}.to_json,
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
'Accept' => 'application/json; version=2'
}, :timeout => 10)
rescue Net::OpenTimeout
response = { "status": false , "message": "Connect To" }
@@ -468,7 +469,7 @@ class SalePayment < ApplicationRecord
}.to_json,
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
'Accept' => 'application/json; version=2'
}, :timeout => 10)
rescue Net::OpenTimeout
response = { "status": false , "message": "Connect To" }