#Kade
1 messages · Page 1 of 1 (latest)
hello! how can I help?
When I tried to pay with my card using the Stripe Pos_E model,
A window appears on the Stripe Pos_E model that fails to pay.
But I couldn't get any error code in my program.
On the Payment page, it just says Imcomplete.
can you share a picture of what that looks like?
And below is my code.
I couldn't get any error information even if I received information about PaymentID.
can you share the request id for that error message?
the paymentID is pi_3NdSMhLOsQno84zQ1T3pIcsF
Can't I upload the information about paymentid?
If so, I will delete it.
it's fine, there's nothing sensitive about a PaymentIntent id
OK. I see.
i think you need to trace through your own code prior to this part - where is the section that you confirm the PaymentIntent and what's the response that you receive?
This is the code that brings information about the payment.
// PaymentIntent 조회
var service = new PaymentIntentService();
var paymentIntent = service.Get(paymentId);
// 결제가 성공했는지 확인
if (paymentIntent.Status == "succeeded")
{
// 결제 성공 처리 로직
dispose();
Source.Log.log.Info("결제 성공");
NavigationService.Navigate(new Uri("View/PaymentComplete.xaml", UriKind.RelativeOrAbsolute));
}
else if (paymentIntent.Status == "canceled")
{
dispose();
Source.Log.log.Info("결제 취소");
NavigationService.Navigate(new Uri("View/ChoicePayment.xaml", UriKind.RelativeOrAbsolute));
}
And I checked with both Last PaymentError and Stripexception.
@lavish forge can you share what's the response returned when you retrieve that PaymentIntent for var paymentIntent = service.Get(paymentId);
I check this
But i can't take any response about the last error
And in Dashboard paymentpage
REspons body is
{
"error": {
"code": "incorrect_number",
"doc_url": "https://stripe.com/docs/error-codes/incorrect-number",
"message": "Your card number is incorrect.",
"param": "number",
"request_log_url": "https://dashboard.stripe.com/logs/req_Kn0YvgUvZOgFcJ?t=1691650724",
"type": "card_error"
}
}
then you need to handle the error based off the response at the point of PaymentIntent confirmation
not using paymentIntent.LastPaymentError != null ?
like you mentioned, LastPaymentError isn't showing anything, so you need to handle this at the point of PaymentIntent confirmation
Then, is there any way to get an error?
LastPaymentError.Inspect Type = "card_error" and PaymentInt.LastPaymentError.Code == "incorrect_number" but no value was received.
Or is there a way to detect the signal from Stripe to Reader?
I will detect the status in the image
hmmm, sorry, i think i got a little bit mixed up before, lets take a couple of steps back.
what did you do / which test card did you use to trigger the incorrect_number error?
The payment was made using a real card, not a test card.
The payment was made with SamSungPay.
give me a while to get back to you
I got it!
👋 Could you clarify which Doc you have been following? Is that a server driven flow?
server driven is correct.
Okie so you called Proces PaymentIntent on backend, correct?
After that did you call Confirm PaymentIntent anywhere?
(I guess you don't)
you mean Did i use this?
var service = new PaymentIntentService();
service.Get("{{PAYMENT_INTENT_ID}}");
you mean this?
var options = new ReaderProcessPaymentIntentOptions { PaymentIntent = "pi_xxx" };
var service = new ReaderService();
service.ProcessPaymentIntent("tmr_xxx", options);
Yes
I already did it
StripeConfiguration.ApiKey = "";
var options = new PaymentIntentCreateOptions
{
Currency = "CAD",
PaymentMethodTypes = new List<string> { "card_present" },
CaptureMethod = "automatic",
Amount = PageSelect.totalmoney * 100
};
Source.Log.log.Info(options);
var service = new PaymentIntentService();
var paymentIntent = service.Create(options);
// PaymentIntent에서 Payment ID 가져오기
paymentId = paymentIntent.Id;
Source.Log.log.Info("PaymentID = " + paymentId);
var options2 = new ReaderProcessPaymentIntentOptions { PaymentIntent = paymentId };
var service2 = new ReaderService();
service2.ProcessPaymentIntent("tmr_xxx", options2);
Did you receive terminal.reader.action_failed like this Doc mentioned?
Like the information in that document, the decline signal to the terminal was checked on the paymentpage.
Yes but it's recommended to check via webhook, and you can look at the action block
Hope that makes sense!
Sorry for the long question.
If so, what is the
var service = new WebhookEndpointService();
service.Create(options);
When I use this to make a webhook, what happens to the respective signals for successful and unsuccessful payments?
Example) failed, success, error, etc.
I apologize for the length of this question.
Okie, so webhook is a different, separated code block you want to create from scratch, and you can take a look from https://stripe.com/docs/webhooks for a starter point
But once you set it up, you can listen to any events come from Stripe
And then you can listen to terminal.reader.action_failed as the above Terminal Doc mentioned
👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
I understand perfectly.
I apologize if I bothered you.
I hope you have a great day.
you haven't, please let me know if you need any more help