Closed StanleyOned closed 5 years ago
Hi @StanleyOned,
To initiate a payment with a stored payment method, simply pass the entire PaymentMethod
in the selectPaymentMethod
's selection handler.
The storedDetails
in a stored payment method are simply for display purposes.
If the holder name is incorrect, it's likely not passed to the SDK correctly. If you don't have it yet, add the following to your /paymentSession
call:
"configuration": {
"cardHolderName": "required"
}
This will make the SDK collect the holder name field.
With kind regards,
Joost
Hello @joostvandijk,
I tried passing the stored payment method but it ends up failing in the didFinish method. Heres what I have:
func selectPaymentMethod(from paymentMethods: SectionedPaymentMethods, for paymentController: PaymentController, selectionHandler: @escaping (PaymentMethod) -> ()) {
if !paymentMethods.preferred.isEmpty {
paymentMethod = paymentMethods.preferred.first
selectionHandler(paymentMethod!)
return
} else {
paymentMethod = paymentMethods.other.first
}
paymentMethodCompletion = selectionHandler
}
Can you please provide details information, if you don't mind.
Thank you!
Stanle
Hi @StanleyOned,
I think you are forgetting to set the payment details. You can check which details are being asked by looking in the payment method's details
.
Note that for stored cards, you still need to ask the user to enter the CVC.
With kind regards,
Joost
@joostvandijk I figured it out! Thank you for helping me!
No problem! Feel free to contact us afain if you have any questions.
Hello Again,
Previously I submitted an issue regarding storing the user payment information. But I ran into another problem, how can I access the store payment information and confirm a purchase with the stored payment information.
This is what I have right now
I cannot send the payment because I only get back the encoded information. Also, the storedDetails.holderName doesn't quite match with what I inputted previously which was John Smith