Skip to content

Commit

Permalink
Merge pull request #26 from Adyen/feature/AD-336b
Browse files Browse the repository at this point in the history
AD-336: Google Express Payments, fix for java-lib update
  • Loading branch information
kpieloch authored Nov 5, 2024
2 parents 23b917e + 54cf803 commit 98b1670
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
/*@import '@adyen/adyen-web/dist/adyen.css';*/
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class GoogleExpressPaymentComponent implements OnInit, OnDestroy{

ngOnDestroy(): void {
this.subscriptions.unsubscribe();
this.googlePay.unmount();
if(this.googlePay) this.googlePay.unmount();
}

private initializeGooglePay() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,7 @@ export class AdyenExpressOrderService extends AdyenOrderService {

prepareDataGoogle(paymentData: any, authorizedPaymentData: any, product: Product): GooglePayExpressCartRequest {
const baseData = {
googlePayDetails: {
googlePayToken: paymentData.paymentMethod.googlePayToken,
googlePayCardNetwork: paymentData.paymentMethod.googlePayCardNetwork
},
googlePayDetails: paymentData.paymentMethod,
addressData: {
email: authorizedPaymentData.authorizedEvent.email,
firstName: paymentData.deliveryAddress.firstName,
Expand All @@ -107,7 +104,7 @@ export class AdyenExpressOrderService extends AdyenOrderService {
}
}
};

delete baseData.googlePayDetails.subtype;
return product ? { productCode: product.code, ...baseData } : baseData;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ describe('CheckoutAdyenConfigurationService', () => {
immediateCapture: false,
countryCode: 'US',
cardHolderNameRequired: true,
sepaDirectDebit: false
sepaDirectDebit: false,
amountDecimal: 1000
};

checkoutConfigurationConnector.getCheckoutConfiguration.and.returnValue(of(mockConfigData));
Expand Down

0 comments on commit 98b1670

Please sign in to comment.