update pagination and booking and rebate redeem
This commit is contained in:
@@ -241,9 +241,10 @@ end
|
||||
url = membership.gateway_url.to_s + memberaction.gateway_url.to_s
|
||||
|
||||
member_params = { name: name,phone: phone,email: email,
|
||||
dob: dob,address: address,nrc:nrc,card_no:card_no,
|
||||
member_group_id: member_group_id,
|
||||
merchant_uid:merchant_uid,auth_token:auth_token}.to_json
|
||||
dob: dob,address: address,nrc:nrc,card_no:card_no,
|
||||
member_group_id: member_group_id,
|
||||
id:id,
|
||||
merchant_uid:merchant_uid,auth_token:auth_token}.to_json
|
||||
|
||||
# Check for paypar account exists
|
||||
# if paypar_account_no != nil || paypar_account_no != ''
|
||||
@@ -252,6 +253,7 @@ end
|
||||
dob: dob,address: address,nrc:nrc,card_no:card_no,
|
||||
paypar_account_no: paypar_account_no,
|
||||
member_group_id: member_group_id,
|
||||
id:id,
|
||||
merchant_uid:merchant_uid,auth_token:auth_token}.to_json
|
||||
end
|
||||
|
||||
@@ -273,7 +275,8 @@ end
|
||||
rescue SocketError
|
||||
response = { status: false}
|
||||
end
|
||||
|
||||
puts "ssssssss"
|
||||
puts response.to_json
|
||||
customer = Customer.find(@crm_customer.customer_id)
|
||||
|
||||
if response["status"] == true
|
||||
@@ -299,9 +302,10 @@ end
|
||||
url = membership.gateway_url.to_s + memberaction.gateway_url.to_s
|
||||
|
||||
member_params = { name: name,phone: phone,email: email,
|
||||
dob: dob,address: address,nrc:nrc,card_no:card_no,
|
||||
member_group_id: member_group_id,
|
||||
merchant_uid:merchant_uid,auth_token:auth_token}.to_json
|
||||
dob: dob,address: address,nrc:nrc,card_no:card_no,
|
||||
member_group_id: member_group_id,
|
||||
id:id,
|
||||
merchant_uid:merchant_uid,auth_token:auth_token}.to_json
|
||||
|
||||
# Check for paypar account exists
|
||||
if paypar_account_no.present?
|
||||
@@ -309,6 +313,7 @@ end
|
||||
dob: dob,address: address,nrc:nrc,card_no:card_no,
|
||||
paypar_account_no: paypar_account_no,
|
||||
member_group_id: member_group_id,
|
||||
id:id,
|
||||
merchant_uid:merchant_uid,auth_token:auth_token}.to_json
|
||||
end
|
||||
|
||||
@@ -331,7 +336,17 @@ end
|
||||
response = { status: false}
|
||||
end
|
||||
|
||||
puts "ssssssss"
|
||||
puts response.to_json
|
||||
|
||||
if response["status"] == true
|
||||
customer = Customer.find(@crm_customer.customer_id)
|
||||
# Check membership id and bind to user
|
||||
if response["membership_id"] != nil
|
||||
status = customer.update_attributes(membership_id: response["membership_id"],membership_type:member_group_id )
|
||||
else
|
||||
status = customer.update_attributes(membership_type:member_group_id )
|
||||
end
|
||||
format.html { redirect_to crm_customers_path, notice: 'Customer was successfully updated.' }
|
||||
format.json { render :show, status: :ok, location: @crm_customer }
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user