update change version v3 for api paymal
This commit is contained in:
@@ -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" }
|
||||
|
||||
Reference in New Issue
Block a user