update change version v3 for api paymal

This commit is contained in:
Aung Myo
2018-03-13 14:23:23 +06:30
parent df781395c8
commit 9f0bef732e
6 changed files with 20 additions and 19 deletions

View File

@@ -85,7 +85,7 @@ class SalePayment < ApplicationRecord
}.to_json,
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json; version=2'
'Accept' => 'application/json; version=3'
}, :timeout => 10
)
rescue Net::OpenTimeout
@@ -133,7 +133,7 @@ class SalePayment < ApplicationRecord
auth_token:auth_token}.to_json,
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json; version=2'
'Accept' => 'application/json; version=3'
},
:timeout => 10
)
@@ -455,7 +455,7 @@ class SalePayment < ApplicationRecord
}.to_json,
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json; version=2'
'Accept' => 'application/json; version=3'
}, :timeout => 10)
rescue Net::OpenTimeout
response = { "status": false , "message": " Connection timeout" }
@@ -500,7 +500,8 @@ class SalePayment < ApplicationRecord
end
rebate_arr.push(data)
end
Rails.logger.debug "Rebage Response"
Rails.logger.debug rebate_arr.to_json
total_amount = rebate_prices - payparcost - overall_dis
if credit == 1
@@ -531,7 +532,7 @@ class SalePayment < ApplicationRecord
}.to_json,
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json; version=2'
'Accept' => 'application/json; version=3'
}, :timeout => 10)
rescue Net::OpenTimeout
response = { "status": false , "message": "Connect To" }