#Binoy Jose - Close sheet programmatically
1 messages · Page 1 of 1 (latest)
Looking in to this. Have you been able to read the issue that nickdnk linked to and if so has it helped?
This thread has been archived. If you need help with anything else please ask in #dev-help or contact Stripe Support: https://support.stripe.com/contact
Hello. I opened this back up again. Let's chat about your issue in here
completion(nil, nil) is not working
Can you provide more info about what you're trying to do?
Are you following a guide?
in applePayContext after receiving the id (paymentMethod.id)and card details I need to close ApplePay Sheet with Success.
Ok
Can you share the piece of code where you are getting an error?
Also which doc are you following?
func applePayContext(_ context: STPApplePayContext, didCreatePaymentMethod paymentMethod: StripeAPI.PaymentMethod, paymentInformation: PKPayment, completion: @escaping STPIntentClientSecretCompletionBlock) {
if let card = paymentMethod.card {
paymentCard = PaymentCard(nameOnCard: nil, number: card.last4, expMonth: card.expMonth, expYear: card.expYear)
print(card)
}
let paymentMethodId = paymentMethod.id
createPayment(withPaymentMethod: paymentMethodId)
completion(nil, nil)
}
That's the high level doc. Can you present the exact step that's giving you an issue in the doc?
Yeah so this is what nickdnk was saying. You can do this, but you can't just pass in nil. You need the PI client secret
I don't have the clientSecret, I am creating the payment and confirming the booking in another call so I need to close ApplePay Sheet with Success.
Hm ok. In that case, I'm not sure whether or not it's possible. Let me reach out to a colleague to find out more
please
Will respond when I hear back from them
ok
So got the confirmation. It's not currently supported