rescue member call and update oqs and js route bug

This commit is contained in:
Yan
2017-06-18 03:20:19 +06:30
parent 80320b6d3e
commit f33f11df64
12 changed files with 102 additions and 51 deletions

View File

@@ -260,12 +260,17 @@ class SalePayment < ApplicationRecord
campaign_type_id = memberaction.additional_parameter["campaign_type_id"]
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 ,merchant_uid:merchant_uid,total_amount: total_amount,campaign_type_id: campaign_type_id,
begin
response = HTTParty.post(url, :body => { generic_customer_id:generic_customer_id ,merchant_uid:merchant_uid,total_amount: total_amount,campaign_type_id: campaign_type_id,
receipt_no: receipt_no,auth_token:auth_token}.to_json,
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
})
}, :timeout => 10)
rescue Net::OpenTimeout
response = { status: false }
end
puts response.to_json
end