Skip to content

Commit

Permalink
tidy paypal a little
Browse files Browse the repository at this point in the history
  • Loading branch information
james-stevens committed Mar 27, 2023
1 parent af125b8 commit 4780008
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions htdocs/paypal.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@

function paypal_startup() // {module}_startup() is a mandatory func in a JS payment module
{
if ((gbl.config.payments)&&(gbl.config.payments.paypal)&&(gbl.config.payments.paypal.client_id))
add_paypal_script(gbl.config.payments.paypal.client_id,gbl.config.currency.iso);
if ((!gbl.config.payments)||(!gbl.config.payments.paypal)) return;

let ppl = gbl.config.payments.paypal;
if (ppl.client_id) add_paypal_script(ppl.client_id,gbl.config.currency.iso);

payments["paypal"] = {
"desc": "Pay by PayPal",
"single": paypal_single_payment
};

if ((gbl.config.payments.paypal)&&(gbl.config.payments.paypal.desc))
payments.paypal.desc = gbl.config.payments.paypal.desc;
if (ppl.desc) payments.paypal.desc = ppl.desc;

}

Expand Down

0 comments on commit 4780008

Please sign in to comment.