merge with crm and room fixed

This commit is contained in:
Yan
2017-07-03 17:47:34 +06:30
23 changed files with 141 additions and 106 deletions

View File

@@ -46,7 +46,7 @@ class Customer < ApplicationRecord
end
def self.get_membership_transactions(customer)
def self.get_membership_transactions(customer,receipt_no = nil)
membership = MembershipSetting.find_by_membership_type("paypar_url")
memberaction = MembershipAction.find_by_membership_type("get_member_transactions")
merchant_uid = memberaction.merchant_account_id.to_s
@@ -55,13 +55,17 @@ class Customer < ApplicationRecord
# urltest =self.url_exist?(url)
begin
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'
},
:timeout => 10
)
response = HTTParty.get(url,
:body => { membership_id: customer.membership_id,
receipt_no:receipt_no,
merchant_uid:merchant_uid,auth_token:auth_token
}.to_json,
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
},
:timeout => 10
)
rescue Net::OpenTimeout
response = { status: false , message: "Server Time out"}

View File

@@ -337,7 +337,7 @@ class SalePayment < ApplicationRecord
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}, :timeout => 100)
}, :timeout => 10)
rescue Net::OpenTimeout
response = { status: false , message: "Server Time out"}