#Binoy Jose - Close sheet programmatically

1 messages · Page 1 of 1 (latest)

cedar quarry
#

Looking in to this. Have you been able to read the issue that nickdnk linked to and if so has it helped?

subtle merlinBOT
muted cloud
#

Hello. I opened this back up again. Let's chat about your issue in here

brazen radish
#

completion(nil, nil) is not working

muted cloud
#

Can you provide more info about what you're trying to do?

#

Are you following a guide?

brazen radish
#

in applePayContext after receiving the id (paymentMethod.id)and card details I need to close ApplePay Sheet with Success.

muted cloud
#

Ok

#

Can you share the piece of code where you are getting an error?

#

Also which doc are you following?

brazen radish
#

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)

}
muted cloud
#

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

brazen radish
#

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.

muted cloud
#

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

brazen radish
#

please

muted cloud
#

Will respond when I hear back from them

brazen radish
#

ok

muted cloud
#

So got the confirmation. It's not currently supported

brazen terrace
#

As I mentioned, you can use the version of the PR I submitted for this functionality

#

I do that exactly for this reason