#sagar_mobile-pm-types
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/1218238606628618422
đ 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.
- sagar_code, 1 day ago, 22 messages
Hello! can you clarify what's the issue? Are you getting an error when you use that code? Do you have a specific request ID I can take a look at?
here is the payment intent id :pi_3OudSjLEriZO1esE1N7fjSHy
and the code to create a payment intent
await stripe.paymentIntents.create({
amount: amount,
currency: "sek",
payment_method_types: ['card','swish','klarna'],
customer: customer.id,
receipt_email: user.email,
confirm: false,
transfer_group: booking,
use_stripe_sdk:true,
});
in the android/ios application only getting the option of card in test mode
Are you using payment sheet?
yes we are using the payment sheet
here is the client side code
STPAPIClient.shared.publishableKey = self.objOrderProject.objOrderProductStripeUserModel?.data?.publishableKey ?? ""
// MARK: Create a PaymentSheet instance
var configuration = PaymentSheet.Configuration()
configuration.merchantDisplayName = "Foodarna"
configuration.customer = .init(id: self.objOrderProject.objOrderProductStripeUserModel?.data?.customer ?? "", ephemeralKeySecret: self.objOrderProject.objOrderProductStripeUserModel?.data?.ephemeralKey ?? "")
// Set allowsDelayedPaymentMethods to true if your business can handle payment
// methods that complete payment after a delay, like SEPA Debit and Sofort.
configuration.allowsDelayedPaymentMethods = true
self.paymentSheet = PaymentSheet(paymentIntentClientSecret: self.objOrderProject.objOrderProductStripeUserModel?.data?.paymentIntentClientSecret ?? "", configuration: configuration)
self.paymentSheet?.present(from: self) { paymentResult in
// MARK: Handle the payment result
switch paymentResult {
case .completed:
print("Your order is confirmed")
case .canceled:
print("Canceled!")
case .failed(let error):
print("Payment failed: \(error)")
}
}
I don't see you specifying a returnURL (https://docs.stripe.com/payments/accept-a-payment?platform=ios&mobile-ui=payment-element#ios-set-up-return-url) anywhere in that code - have you done that yet?
sagar_mobile-pm-types