#tienbt_api

1 messages ยท Page 1 of 1 (latest)

somber torrentBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1218100548998266971

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

harsh rampartBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

opal quest
#

hello! how can I help?

sacred sequoia
#

Hi

#

My name is Chau

#

I am integrating apple pay to my website

#

I have made it to this step

#

Please check for me, what should I do next?

opal quest
#

are you running into any specific issues or have any specific questions? I don't know what are your requirements or how your application should work so I can't really advise unless you provide more details

sacred sequoia
#

how do i listen for event after selecting any card of apple pay

#

I am coding by vuejs

opal quest
#

what do you want to do with the event? What do you want to be informed of?

sacred sequoia
#

Yes, Thank you.

opal quest
#

you need to let me know what do you want to do with the event and what you want to be informed of before I can help further

sacred sequoia
#

rguments: TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in this context.

caller: TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in this context.

#

Please help me check this error. Thank.

opal quest
#

which line of code is this error coming from?

sacred sequoia
#

expressCheckoutElement.on('confirm', async (event) => {
...

const {error: submitError} = await elements.submit();

#

this.expressCheckoutElement.on('confirm', async (event) => {
console.log("๐Ÿš€ this.expressCheckoutElement.on event:222222222222", event) })

#

It is error when console.log(event)

opal quest
#

What are you logging the event for?

sacred sequoia
#

This is event.

opal quest
#

alright, but creating a PaymentMethod doesn't require you to log the event right? What's the issue/problem that you're actually trying to solve here?

sacred sequoia
#

We skip the above.
Can you guide me how to test apple pay with failed cases? Thanks

opal quest
#

When using Google/Apple Pay in test mode, Stripe will automatically replace whatever card you have in your wallet by the 42..42 test card for Apple Pay and 4111..11 test card for Google Pay. This means that all Apple/Google Pay test payments will succeed.

If you want to simulate a failed payment with Apple/Google Pay, you can try two workarounds :

Use Radar
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'
Google Pay: Block if :digital_wallet: = 'android_pay'

**Stubbing the result PaymentMethod with a decline token:
**
Another option is to stub the resulting PaymentMethod from Apple/Google pay with one of the decline PaymentMethods (e.g. pm_card_visa_chargeDeclined) in order to simulate a failure payment attempt. This applies when you are collecting a PaymentMethod and then confirming the Payment.

Example

...
  const {paymentIntent, error: confirmError} = await stripe.confirmPayment(  
    clientSecret,  
    {payment_method: 'pm_card_visa_chargeDeclined'
},  
  );  
...