Changeset 17241 for main/kofacustom.nigeria/branches/uli-paypal/src/kofacustom/nigeria/paypal/applicantsbrowser.py
- Timestamp:
- 26 Dec 2022, 08:13:49 (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/branches/uli-paypal/src/kofacustom/nigeria/paypal/applicantsbrowser.py
r17240 r17241 144 144 submit_button = _('Pay now') 145 145 146 amount='10' 146 # Nigerian Naira would be "NGN" but is not supported with 147 # most paypal accounts 148 currency_code = 'USD' 147 149 148 150 @property … … 150 152 return self.context.r_payment_link 151 153 152 def create_paypal_order(self ):154 def create_paypal_order(self, currency_code): 153 155 if self.context.r_pay_reference or self.context.p_state == 'paid': 154 156 return _("Payment ticket can't be re-sent to Paypal.") … … 164 166 # The success url... 165 167 self.responseurl = self.url(self.context, 'capture_paypal_payment') 166 # Nigerian Naira would be "NGN" but is not supported with 167 # most paypal accounts 168 amount = Amount(value=self.context.amount_auth, currency_code="USD") 168 amount = Amount(value=self.context.amount_auth, currency_code=self.currency_code) 169 169 purchase_units = [ 170 170 PurchaseUnit(description=self.context.p_id, amount=amount) … … 195 195 self.paypal_error = u'' 196 196 if not self.context.r_payment_link: 197 self.paypal_error = self.create_paypal_order( )197 self.paypal_error = self.create_paypal_order(self.currency_code) 198 198 if self.paypal_error: 199 199 self.flash(error, type='danger')
Note: See TracChangeset for help on using the changeset viewer.