craftcms / commerce-paypal-checkout

PayPal Checkout gateway for Craft Commerce.
https://plugins.craftcms.com/commerce-paypal-checkout
MIT License
5 stars 10 forks source link

Disabling the standard Paypal Button #44

Closed iamtompickering closed 2 years ago

iamtompickering commented 2 years ago

Description

I know that it is possible to use the disable-funding parameter to disable the different funding sources that PayPal offers, but is there the option to actually disable the standard PayPal button with this parameter?

I've checked in the docs and cant see an option for this (https://developer.paypal.com/docs/checkout/reference/customize-sdk/#disable-funding), but just wondering if you know of a way to achieve this.

I essentially just want to be able to show the Credit / Debit Card option as the only funding source when this gateway is selected.

nfourtythree commented 2 years ago

Hi @iamtompickering

This is not something I have seen before and I can't see anything in the docs to suggest this is possible in regards to customising the SDK.

This would probably be a question best asked directly to PayPal to see if they have any insight on this.

People tend to use the getPaymentFormHtml() method but we recommend if you are doing anything custom to roll their own JS and HTML giving you far greater control. I think if PayPal says it is possible this would be the avenue to go (unless there is a secret SDK setting/param).

I will close this issue for now but please update it if you find any further information.

Thanks!

peteeveleigh commented 2 years ago

@iamtompickering @nfourtythree how do you pass the disable-funding parameter? Is that done via a hidden form field or do you need to modify the submission url in some way?

peteeveleigh commented 2 years ago

Jeez i see it on the docs now 🤦