Skip to content

Commit c585e93

Browse files
feat(payment): PAYPAL-5941 test
1 parent ca34da1 commit c585e93

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/paypal-commerce-integration/src/paypal-commerce/paypal-commerce-button-strategy.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,15 @@ export default class PayPalCommerceButtonStrategy implements CheckoutButtonStrat
9090
return Promise.resolve();
9191
}
9292

93-
private renderButton(
93+
private async renderButton(
9494
containerId: string,
9595
methodId: string,
9696
paypalcommerce: PayPalCommerceButtonInitializeOptions,
97-
): void {
97+
): Promise<void> {
9898
const { buyNowInitializeOptions, style, onComplete, onEligibilityFailure } = paypalcommerce;
9999

100100
console.log('RENDER');
101+
await this.handleClick(buyNowInitializeOptions);
101102

102103
const paypalSdk = this.paypalCommerceIntegrationService.getPayPalSdkOrThrow();
103104
const state = this.paymentIntegrationService.getState();
@@ -116,7 +117,7 @@ export default class PayPalCommerceButtonStrategy implements CheckoutButtonStrat
116117
};
117118

118119
const buyNowFlowCallbacks = {
119-
onClick: () => this.handleClick(buyNowInitializeOptions),
120+
// onClick: () => this.handleClick(buyNowInitializeOptions),
120121
onCancel: () => this.paymentIntegrationService.loadDefaultCheckout(),
121122
};
122123

0 commit comments

Comments
 (0)