craftcms / commerce-paypal

PayPal payment gateway for Craft Commerce.
https://plugins.craftcms.com/commerce-paypal
MIT License
6 stars 9 forks source link

Add ability to specify additional configuration for PayPal Express button #5

Closed ackwell closed 5 years ago

ackwell commented 6 years ago

When using the PayPal Express payment gateway, the PayPal button generated by resources/js/paymentForm.js has no means to customise the styling of the button itself (e.g. via the style: prop).

While it's possible to work around this by making a non-vendor copy of the init code, I'm hesitant to do so in case changes are made to the underlying systems it's leaning on.

Apologies in advance if I've totally missed the option somewhere.

j-greig commented 5 years ago

Also very keen to have this option 👍

In the meantime, a way to disable the paymentForm.js from being loaded would be great, maybe there's an existing way to achieve this?

andris-sevcenko commented 5 years ago

@j-greig You can always just not use gateway.getPaymentForm(), which includes the paymentForm.js, but roll your own.

@ackwell this approach also will fix your issue.