Skip to content

Commit

Permalink
fix: adding the c2p shopperemail upon initial rendering (#1188)
Browse files Browse the repository at this point in the history
  • Loading branch information
zenit2001 authored Oct 17, 2024
1 parent 8017d91 commit ad19e9d
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ if (
] = window.googleMerchantID;
}

$('body').on('checkout:updateCheckoutView', (event, data) => {
if (data.order.orderEmail) {
const { clickToPayConfiguration } =
store.checkoutConfiguration.paymentMethodsConfiguration.card;
clickToPayConfiguration.shopperEmail = data.order.orderEmail;
}
});

// Submit the payment
$('button[value="submit-payment"]').on('click', () => {
if (store.paypalTerminatedEarly) {
Expand Down

0 comments on commit ad19e9d

Please sign in to comment.