#dovahkiin
1 messages · Page 1 of 1 (latest)
👋 Hi there, Happy to help!
Could you please resume your last issue ?
Yes the issue is the following:
I'm trying to implement paynow, so I copied an example from the doc to an html file but the issue I have is the popup with the QR code never opens.
So then obviously when the confirm request is sent I have an error saying there is no payment method attached.
here is a link where you can see the issue : https://replit.com/join/knofbsprhc-bilalatmane
Yesterday someone here tried to help me and managed to have the QR code opens with nearly the same code as me so I start wondering if this is linked to the configuration of the account I use.
Could you try to reproduce the sample I just sent you but with your own publishable and client secret to check if that makes a difference ?
Do you have a public accessible page demo instead ?
I don't get what you mean, the link I shared with you is publicly accessible, do you have an issue with it ?
Yes, I need to create an account unfortunately
Thanks for sharing, give me couple of minutes while I do a test please
Could you please share also how are you creating the Payment Intent ?
yes I'll give you the request + response
Actually I found the related PaymentIntnet according to the client_Secret you shared above:
Here is the creation request:
https://dashboard.stripe.com/test/logs/req_73GrLDs8Gtk8qR
Actually you are missing to set this two parameters:
payment_method_types: ['paynow'],
payment_method_data: {type: 'paynow'},
AS mentioned in the documentation:
https://stripe.com/docs/payments/paynow/accept-a-payment?platform=web#create-payment-intent
Your request body when creating the PaymentIntent should be something like this:
{
amount: "11700",
payment_method_types: ['paynow'], // Set this param
payment_method_data: {type: 'paynow'}, // Set this param
capture_method: "automatic",
shipping: {
address: {
line1: "152 b Rue du Général de Gaulle94350 Villiers-sur-Marne",
city: "Villiers-sur-Marne",
postal_code: "94350",
country: "FR"
},
phone: "33 751390441",
name: "Guesmi Abdelkader"
},
metadata: {
order_reference: "FRAMYORDER7071"
},
currency: "SGD",
}
Damn I guess that's what was missing !! Since we didn't have to update the payment_method_data for other payment methods with stripe we must've missed it. However what's strange is that we normally are sending the payment_method_types
Ah yes it's there i'm not crazy 😅 let me try to add the payment_method_data and see if it solves the issue
alelujaa the popup is opening with it ! 🥳