Support More Payment Methods in the Stripe Element Payment Integration

I would like to see more payment methods in the Stripe add-on's Stripe Element supported. Currently the Stripe Element only supports the "card" payment method which enables regular cards as well as "link" and apple/google pay on certain devices.

Priority payment methods I would like to see are:

  • Amazon Pay
  • Apple Pay
  • Cash App Pay
  • Google Pay
  • Link
  • Samsung Pay
  • Stablecoins and Crypto
  • Afterpay / Clearpay (from Cash App)
  • Klarna

I took a stab at patching the plugin to support more of these payment methods but the responses of the other payment methods do not get processed correctly at the BookingPress side and the appointments don't get created even though the payments do complete on Stripes side.

The default BookingPress Stripe payment element looks somewhat like this (I was able to do some theming so mine differs a bit):
image

Upon removing the hard-coded payment method in the booking press-stripe add-on ("card" only) I get all the enabled payment methods in my Stripe account shown like this:
image

* That is better and at least we can now see all the available payment methods, but of course it is a little too much data shown horizontally for my taste.

I then used the documentation and added into the javascript.

First within the javascript constant options I added the layout to change it to a vertical accordion. Then I added the constant options into the payment element creation. Linked below is a diff of the changes I made to fix this, including some changes I made in order to theme the appearance via a Wordpress filter.

https://gist.github.com/nalipaz/06dbdfcfd08a096e4b500e24132ccdfc

Here is what is looks like now which is a marked improvement and will allow our customers to pay with any other payment methods enabled within the Stripe Dashboard Payment settings.

image

Testing however of my linked patch I can see that although all of the presented payment methods work there seems to be an issue booking the appointment.

  1. 1. Choose a payment method like Cash App, Amazon, or other options that were not available before these changes.
  2. Do the normal steps to process the payment.
  3. You will be redirected back to the website and arrive at the confirmation screen on the booking form stating that the booking was successful.
  4. Looking at the success message you see everything looks correct except there is no Booking ID on the page. No notifications go out, No appointment is booked in BookingPress, No payment is shown in BookingPress.

So it works, but bookings don't work anymore when I use one of the newly enabled payment methods.

The solution for the BookingPress team is to properly parse the responses from Stripe after payment with each of the above payment methods. As I understand it, the responses from Stripe after payment do not all have the same structure so they would need to parse each one a little differently which means writing some code to handle each of the new Stripe payment methods.

I am hoping this can be added since it really makes the payment processing look more native on the BookingPress form.