Revisiting the PayPal Checkout Module, Smart Buttons - Allow URI Parameters Customization
The PayPal Checkout (which uses PayPal's smart buttons on order forms and invoices) is the newer module that WHMCS has developed to replace the previous PayPal basic module is a great update which offers better control of payments/subscriptions for customers, but it has a lot of draw backs that are not currently being addressed by WHMCS, and this module seems to have remained fairly stagnant since it's original introduction.
This is what the default implementation of WHMCS's PayPal Checkout looks like:
https://i.imgur.com/yypSdX0.pngBut the PayPal Smart Buttons offer many designs, and many different implementations. You can enable other buttons such as PayPal Credit, Venmo, etc, and you can even remove the black "Debit or Credit Card" button, if you want to use a separate merchant processor for card payments.
All of those features are simple to implement using URI parameters, but WHMCS has not exposed configuration of those variables in their software.
Here are some examples of what's possible with PayPal Smart Buttons:
https://i.imgur.com/YPqpM6o.pnghttps://i.imgur.com/yr3n33u.pnghttps://i.imgur.com/nnrJZLa.jpg----
And here is the testing sandbox to toy around with the URI parameters yourself:
https://developer.paypal.com/demo/checkout/#/pattern/serverList of URI Parameters and possible settings:
&disable-card=visa,mastercard,amex,discover,jcb,elo,hiper
&disable-funding=card, credit, paylater, bancontact, blik, eps, giropay, ideal, mercadopago, mybank, p24, sepa, sofort, venmo.
&intent=capture, authorize, subscription, tokenize
&components=buttons, marks, messages, funding-eligibility, hosted-fields
---
And PayPal also allows for changing the shape, label, and color of the buttons, eg. rect, pill, etc.
paypal.Buttons({
style: {
color: 'blue',
shape: 'rect',
label: 'pay',
height: 40
}
}).render('#paypal-button-container');
---
But with the way WHMCS has implemented the PayPal Checkout Module on the invoice, you will not currently be able to modify those values without some hacky javascript include.
Other cart solutions, eg. WooCommerce, and Miva have already implemented this extended functionality in their PayPal smart button configuration settings.
Examples:
Miva:
https://i.imgur.com/SE5udAJ.pngWooCommerce:
https://woocommerce.com/document/woocommerce-paypal-payments/#button-on-checkout----
Hopefully this post is detailed enough to result in some overhauling of this payment gateway. Because I've been wanting to migrate my customers to the new module for a while now, but refuse to do so with the current lack of configurable options of this new gateway.
1 Comment
Login to post a comment.
https://stackoverflow.com/questions/71919506/disabling-paypal-black-debit-or-credit-card-button-in-whmcs
https://whmcs.community/topic/297814-how-to-remove-paypal-checkout-on-order-summary/?ct=1656697248