webdna / commerce-braintree

Braintree gateway for Craft Commerce
Other
2 stars 10 forks source link

Fixed error when attempting to use Google Pay #38

Closed jmauzyk closed 2 years ago

jmauzyk commented 3 years ago

Currently, when trying to use Google Pay we're getting the console error DEVELOPER_ERROR in loadPaymentData: transactionInfo must be set!. This is because the googlePay options in DropinUi.js are for Apple Pay and don't include the necessary transactionInfo object (correct object details here).

My code changes pull the currency and amount from those variables elsewhere in the script. totalPriceStatus is set to FINAL, but depending on other plugin users' needs this and other options may need to be configurable on a case-by-case basis. I also added a settings field for googlePayMerchantId as this string will need to be passed to dropin-ui.twig for production environments.

jmauzyk commented 2 years ago

@mcjackson18 any chance you all can take a look at this sometime in the next couple weeks?

mcjackson18 commented 2 years ago

Hi @jmauzyk, we'll try and review this next week.

mcjackson18 commented 2 years ago

Thanks for the PR @jmauzyk, this issue has been fixed in version 2.4.1.