update sale and customer

This commit is contained in:
Aung Myo
2017-06-14 18:13:13 +06:30
parent 914069e3af
commit 2da2edc5ec
8 changed files with 112 additions and 166 deletions

View File

@@ -69,20 +69,8 @@ class Origami::HomeController < BaseOrigamiController
def get_customer
@customer = Customer.find(params[:customer_id])
membership = MembershipSetting.find_by_membership_type("paypar_url")
memberaction = MembershipAction.find_by_membership_type("get_all_member_account")
merchant_uid = memberaction.merchant_account_id.to_s
auth_token = memberaction.auth_token.to_s
url = membership.gateway_url.to_s + memberaction.gateway_url.to_s
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'
}
)
response = Customer.get_member_account(@customer)
respond_to do |format|
format.js do