#sweetpotato8776
1 messages · Page 1 of 1 (latest)
confirmPayment is completed, it will be redirected to return_url(ex,. return_url: 'https://example.com/order/123/complete',)
completed here, you give a value like succeeded or failed to a variable called "redirect_status" as a request parameter.
Do you understand up to this point?
Yes
I can't find in the documentation what value "redirect_status" comes in.
I think I've seen it before
Is this a deleted variable?
Oh you are searching for documentation about redirect_status? Not sure, will have a look.
You can find some info about the query parameters here, but it's doesn't mention redirect_status
https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-submit-payment
Still looking...
Are those two everything? But I'm getting "redirect_status"
Yes there's also redirect_status, but it's not mentionned on this page for some reason.
I can't find much about it in the documentation.
so is this a value I shouldn’t use?
I'm sure it was developed that way based on the documentation.
What do you mean? You can completely ignore that parameter.
I want to handle it separately when the user closes the window while making a payment.
When I closed the payment window, "redirect_status" came up as "failed". I was wondering if what I thought was correct.
or Are there any other cases where it fails?
For this your should use webhook events, this is unrelated to redirect_status.
why???????
i mean what does " redirect_status" have to do related with ?
When i close the payment window, i want to go back to the order start screen. Webhooks don't handle that, right?
Even if you close the payment window midway , it will be redirected to return_url(ex,. return_url: 'https://example.com/order/123/complete',)
So I think we should branch there.
👋 taking over for my colleague. Let me catch up.
what you should be doing is basically retrieving the PayementIntent https://stripe.com/docs/js/payment_intents/retrieve_payment_intent and check it's status
that's a more robust implementation
I want to know the event in which the user closed the payment window. In the country where I live, the response is usually given with a value like USERCANCEL.
In the country where I live
which country is that?
I already know the link you just gave me. I can't go back to the first checkout page with what's written there.
would you mind sharing a request ID or a PaymentIntent ID?
"id": "pi_3O3E5nEBFG6Yi3HC12Q6Acg0",
taking a look
i create a payment method and close the payment window, the payment intent will be canceled, so the object will currently be in the cancel state.
the payment intent will be canceled
you're explicitly cancelling the Payment Intent https://dashboard.stripe.com/test/logs/req_gWzrjoBZ8OKjS5
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I'm trying to understand your integration
how are you creating the payment method
which integration path are you using?
the deferred payment method with a manual payment method creation?
The service has not opened yet..
I'm not sure I follow
// Create the PaymentMethod using the details collected by the Payment Element
const {error, paymentMethod} = await stripe.createPaymentMethod({
elements,
params: {
billing_details : billingDetail
}
});
obj.paymentMethodId = paymentMethod.id;
// Create the PaymentIntent
const response = await RestClient.post("/api/stripe/payment-intent")
.data(obj)
.run()
.then(response => {
return response;
})
why not confirm the PaymentIntent in the frontend directly?
I'm not sure that you need to manually create the payment method and send it to the backend to confirm it server side
even if you want to use the deferred flow, you can follow the steps described here https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=payment
because we verified your data before confirmPayment
we verified your data
what do you mean by that?
I don't speak English so I think you don't understand my intentions...
ㅠㅠㅠ
The server verifies once more whether the coupon is valid or the correct price.
I'll try again. Thanks for trying to help.....
you can do that when you're creating the PaymentIntent
in this step I mean https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=payment#create-intent
Do this when create paymentinent and before confirm.
double check
There are cases that people go to the order page but don’t pay.
that's what the deferred flow is meant to solve
please read through the doc I sent you
thank you..
let me know if you need any more help