#kops_76861

1 messages · Page 1 of 1 (latest)

mental tulipBOT
unkempt geyser
#

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

timber yew
#

I want to test the failed payment via apple pay

#

could you please let me know if there are ways to do it

unkempt geyser
#

are you using the payment request button?

timber yew
#

what do you mean by payment request button ?

unkempt geyser
#

how are you integrating with Stripe?

timber yew
#

We use the stripe's payment element.

unkempt geyser
#

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

timber yew
#

Is there any other way to test a real scenario like insufficient funds ?

unkempt geyser
#

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}  
  );  

  // ...
});```