You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Apple Pay not working, amount is nil inside ApplePayExecutor. working fine with Android play, and classic credit card/paypal with createPaymentSheet method.
To Reproduce
Steps to reproduce the behavior:
1. await Stripe.createApplePay({ paymentIntentClientSecret: paymentIntent, paymentSummaryItems: [ { label: 'xxx', amount: 500, }, ], merchantIdentifier: 'merchant.com.xxx', countryCode: 'FR', currency: 'EUR', });
error inside ApplePayExecutor :
`
func createApplePay(_ call: CAPPluginCall) {
let paymentIntentClientSecret = call.getString("paymentIntentClientSecret") ?? nil
if paymentIntentClientSecret == nil {
call.reject("Invalid Params. this method require paymentIntentClientSecret")
return
}
let items = call.getArray("paymentSummaryItems", [String: Any].self) ?? nil
if items == nil {
call.reject("Invalid Params. this method require paymentSummaryItems")
return
}
var paymentSummaryItems: [PKPaymentSummaryItem] = []
if let strs = items {
for item in strs {
let label = item["label"] as? String ?? ""
let amount = item["amount"] as? NSNumber
let amountD: NSDecimalNumber
amountD = NSDecimalNumber(decimal: **amount!**.decimalValue)
// .........
`
CapacitorCommunityStripe/ApplePayExecutor.swift:42: Fatal error: Unexpectedly found nil while unwrapping an Optional value
Expected behavior
getting amount should not be nil
Screenshots
Additional context
iOS simulator : iPhone 15 pro.
I follow all step from documentation, merchant certificate etc...
Using Function:
Payment Sheet / Payment Flow
Apple Pay
Google Pay
Identity (@capacitor-community/stripe-identity)
Terminal(@capacitor-community/stripe-terminal)
The text was updated successfully, but these errors were encountered:
Platform
Describe the bug
Apple Pay not working, amount is nil inside ApplePayExecutor. working fine with Android play, and classic credit card/paypal with createPaymentSheet method.
To Reproduce
Steps to reproduce the behavior:
1.
await Stripe.createApplePay({ paymentIntentClientSecret: paymentIntent, paymentSummaryItems: [ { label: 'xxx', amount: 500, }, ], merchantIdentifier: 'merchant.com.xxx', countryCode: 'FR', currency: 'EUR', });
error inside ApplePayExecutor :
`
func createApplePay(_ call: CAPPluginCall) {
let paymentIntentClientSecret = call.getString("paymentIntentClientSecret") ?? nil
if paymentIntentClientSecret == nil {
call.reject("Invalid Params. this method require paymentIntentClientSecret")
return
}
CapacitorCommunityStripe/ApplePayExecutor.swift:42: Fatal error: Unexpectedly found nil while unwrapping an Optional value
Expected behavior
getting amount should not be nil
Screenshots
Additional context
iOS simulator : iPhone 15 pro.
I follow all step from documentation, merchant certificate etc...
Using Function:
The text was updated successfully, but these errors were encountered: