#mike-willay_error
1 messages ยท Page 1 of 1 (latest)
๐ 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/1388032870433423380
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- mike-willay_confirmation-token-billing-details, 16 hours ago, 44 messages
- mike-willay_code, 21 hours ago, 71 messages
message.txt contains the confirm method response
Hi do you need any more details ?
Do let me know
Hi there
Does stripe is validating tokne from their end, how does this flow work as other payment methods are working fine but I ma facing issue with particular this one
Hmm why are you calling confirmAfterpayClearpayPayment after it is coming back from AfterPay. That's where it already succeeded
how do we know that it is error or succeed from the client side , as the finla request will be handle from the server side
So does just passing the payment_intent_client_secret to the server it will work as expectedly or ?
I think you are confused. Let's take a step back
which method did you use to get to redirect to AfterPay page?
We are natively opening a window, I am not using stripe action to perfom this operations
open a window but load which URL?
From the server we are creating the intent and in that we are receiving the url, and from that url we are opening a window
PaymentIntentCreateOptions
Gotchas. On server you are creating the intent with confirm: true, correct?
yes
{
PaymentMethod = token,
Amount = Convert.ToInt32(amount * 100),
Currency = currency.ToLower(),
Description = string.Format("{0} {1}", storeName, orderNumber),
//StatementDescriptor = storeName.Trim(),
Confirm = true,
Metadata = metadata,
Expand = new List<string> { "latest_charge" }
};
So that's same with what confirmAfterpayClearpayPayment is doing (they are both confirming)
When you got the URL, open a window and redirected back to your site, you can use this JS method to check the PI status: https://docs.stripe.com/js/payment_intents/retrieve_payment_intent
But this same flow is working for the Amazon Pay cashApppay
if this is success then just passing the payment_intent_client_secret to the server will do the job right ?
There is no need of use confirmAfterpayClearpayPayment as during intent creation we are already verifying the request from the server right ?
There is no need of use confirmAfterpayClearpayPayment as during intent creation we are already verifying the request from the server right
Yes
if this is success then just passing the payment_intent_client_secret to the server will do the job right ?
Which job your server is doing? The method I suggested above can help you verify the PI status on client-side, using the client_secret. Basically the PI is confirmed already and you don't need to do anything else, or it is errored and you need to provide another different payment method
But this same flow is working for the Amazon Pay cashApppay
Depends on what do you mean by "same flow". I believeconfirmAfterpayClearpayPaymentat least is a specific method and you don't use it on AmazonPay or CashApp
yes on Amzon pay we are using confirmAmazonPayPayment, same as for the cashAppPay it is different
What is the PI status when it comes back from AmazonPay page?
we are calling the enpoint
public virtual PaymentIntent Confirm(string id, PaymentIntentConfirmOptions options = null, RequestOptions requestOptions = null)
{
return this.Request<PaymentIntent>(BaseAddress.Api, HttpMethod.Post, $"/v1/payment_intents/{WebUtility.UrlEncode(id)}/confirm", options, requestOptions);
}
to check the whether payment has been confirmed or not
First we are calling this to check eithere it is confirmed or not
public virtual PaymentIntent Get(string id, PaymentIntentGetOptions options = null, RequestOptions requestOptions = null)
{
return this.Request<PaymentIntent>(BaseAddress.Api, HttpMethod.Get, $"/v1/payment_intents/{WebUtility.UrlEncode(id)}", options, requestOptions);
}
if not then we are confirming from the above first method
Server
Alright that looks ok to me. The Confirm function should behaves the same for AmazonPay and AfterPay
We are facing particulary issue for the AftarPay only
rest payment options are working fine using the same flow
Yes I know but I think the flow itself doesn't make sense for confirming twice. Still you would want to check the status first before confirming again on frontend if you wish to keep using the flow
For the particular Afterapy, I am now using this method which you mentioned earlier retrievePaymentIntent and then on success processing request on server
Make sense as it is already confirming so, Thank you so much for your guidance