Skip to content

Commit

Permalink
Testing apple pay
Browse files Browse the repository at this point in the history
  • Loading branch information
Petrisor Frincu committed Sep 3, 2024
1 parent c7512f1 commit 67a445d
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions apps/web/components/PayPal/ApplePayButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,20 @@ const applePayPayment = async () => {
if (!order || !order.order || !order.order.id) throw new Error('Order creation failed.');
console.log('Confirming Apple Pay order...');
await applePay.confirmOrder({
orderId: transaction.id,
token: event.payment.token,
billingContact: event.payment.billingContact,
});
console.log('Transaction ID:', transaction.id);
console.log('Payment Token:', event.payment.token);
console.log('Billing Contact:', event.payment.billingContact);
try {
await applePay.confirmOrder({
orderId: transaction.id,
token: event.payment.token,
billingContact: event.payment.billingContact,
});
} catch (error) {
console.error('Error during Apple Pay confirmation:', error);
throw new Error('Apple Pay confirmation failed');
}
console.log('Executing order...');
await executeOrder({
Expand Down

0 comments on commit 67a445d

Please sign in to comment.