First off, thanks for the awesome work on trying to integrate Apple Pay w/ Stripe. I had a go with this module on a pretty basic Commerce Kickstart site and am getting a couple of issues. First off, I'm not sure if this module is fully functional but I am trying it out to see if I can get it to work.

I've got a MacBook PRO w/ Touchbar and have Apple Pay configured and have a card setup on my Wallet. I have a site setup locally w/ an https URL. I used Safari and got all the way to selecting the 'Apply Pay' payment method but upon clicking 'Continue', I'm getting a JS not enabled error and a message saying I need to setup Apple Pay on my device first. I thought I would see that Apple 'Pay' button but it seems hidden.

I'm not sure if it's because I'm testing on localhost or if I'm missing something else. I'm not using test mode. Would appreciate it, if you have any pointers. Would love to get this module completely working. I'd like to help out in anyway I can. Thanks.

Comments

shabana.navas created an issue. See original summary.

shabana.navas’s picture

Issue summary: View changes
shabana.navas’s picture

Update: I actually got around that issue and am now getting the Apple 'Pay' button. I ended up changing the selector for the checkout in line 28 of commerce_applepay.js to var $form = $('#commerce-checkout-form-review'); .

However, I'm now getting a

TypeError: Total amount must be greater than zero.

Trying to troubleshoot that. Will continue to update this post as I go.

shabana.navas’s picture

StatusFileSize
new2.74 KB

Awesome! I got Apple Pay to work with the changes in the patch. The error was mainly due to supplying an empty amount (bug in the $amount_formatted line) and calling the wrong checkout form selector in commerce_applepay.js. We just need to make the jquery a bit more robust so that it gets the right checkout form selector.

shabana.navas’s picture

Status: Active » Needs review
StatusFileSize
new4.39 KB

A cleaner patch.