Code improvements and phpcs fixes.
A little change for a checkbox title in the #8 patch.
Hi! Here is the patch that integrates Google/Apple Pay (Stripe Payment Request Button) into this module. Tested with anonymous customers and with or without the Commerce Shipping module. In case of Commerce Shipping is enabled, the shipping profile is taken from the Shipping Information form, and the billing profile is taken from Google/Apple Pay response. When the shipping method is changed on the order_information page, payment information is refreshed via Ajax, to set the updated order total amount for the Google/Apple Pay payment request. In the Payment information form, there is a "Pay with Google/Apple Pay" checkbox. If the shipping form is not filled out, or the shipping method is not selected it will ask to do it, before showing Google/Apple Pay button. If the customer is not able to pay with a digital wallet, a "not available" message will be shown.
It is implemented without a "Review" checkout page, as it does not make sense, and Google/Apple pay popups are like Review types of panes. After payment is processed, it will redirect to the Complete checkout page.
Here is some instruction on how to configure this patch:
1. Apply the patch.
2. Clear Drupal cache.
3. Go to edit Stripe payment gateway configurations page.
4. Enable "Enable the possibility to pay with Google/Apple pay" checkbox.
5. Fill "Stripe Account ID" input and save the updated Stripe payment gateway settings.