#kops_76861
1 messages · Page 1 of 1 (latest)
sorry for the misunderstanding
I didn't mean for you to use the test cards on your Apple Pay
I meant if you want to test the flow
whether the payment is cards or Apple Pay
the flow is the same
so instead of testing with Apple Pay you can just test with cards
I want to test the failed payment via apple pay
could you please let me know if there are ways to do it
are you using the payment request button?
what do you mean by payment request button ?
how are you integrating with Stripe?
We use the stripe's payment element.
You can use Radar to block some transactions according to some rules. In order to block Google/Apple Pay payments, you can rely on the Block rule with the digital_wallet attribute:
Apple Pay: Block if :digital_wallet: = 'apple_pay'
Remember to deactivate or remove this custom rule after your testing is complete to avoid blocking legitimate Apple Pay transactions
Is there any other way to test a real scenario like insufficient funds ?
not if you're using PaymentElement
but if you were to use PaymentRequestButton then yes
and do the following
// Use pm_card_visa_chargeDeclined for tests
// and ev.paymentMethod.id for real scenarios
const paymentMethodId = 'pm_card_visa_chargeDeclined';
const {paymentIntent, error: confirmError} = await stripe.confirmCardPayment(
clientSecret,
{payment_method: paymentMethodId},
{handleActions: false}
);
// ...
});```