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.
Currently, when trying to use Google Pay we're getting the console error
DEVELOPER_ERROR in loadPaymentData: transactionInfo must be set!
. This is because thegooglePay
options inDropinUi.js
are for Apple Pay and don't include the necessarytransactionInfo
object (correct object details here).My code changes pull the currency and amount from those variables elsewhere in the script.
totalPriceStatus
is set toFINAL
, 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 forgooglePayMerchantId
as this string will need to be passed todropin-ui.twig
for production environments.