payment_setting

This commit is contained in:
Moe Su
2017-06-08 17:57:29 +06:30
parent b57e24c076
commit 74b0550c30
46 changed files with 960 additions and 22 deletions

View File

@@ -174,7 +174,6 @@ class SalePayment < ApplicationRecord
end
def paypar_payment
puts "Paypar Payment"
payment_status = false
#Next time - validate if the vochure number is valid - within
@@ -187,7 +186,7 @@ class SalePayment < ApplicationRecord
campaign_type_id =1;
customer_data = Customer.find_by_customer_id(self.sale.customer_id)
membership_setting = MembershipSetting.find_by_membership_type("smartpay_url")
membership_setting = MembershipSetting.find_by_membership_type("paypar_url")
membership_data = SalePayment.redeem(membership_setting.gateway_url,membership_setting.auth_token,customer_data.membership_id,self.received_amount,self.sale.sale_id,campaign_type_id)
if membership_data["status"]==true
SalePayment.where(:sale_payment_id => self.sale_payment_id).update_all(:payment_status => 'paid')

View File

@@ -0,0 +1,2 @@
class Settings::MembershipAction < ApplicationRecord
end