diff --git a/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt b/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt index ca66b44a7..3345c4cf0 100644 --- a/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +++ b/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt @@ -607,6 +607,9 @@ internal fun mapToShippingDetails(shippingDetails: ReadableMap?): ConfirmPayment return ConfirmPaymentIntentParams.Shipping( name = getValOr(shippingDetails, "name") ?: "", + phone = getValOr(shippingDetails, "phone") ?: "", + trackingNumber = getValOr(shippingDetails, "trackingNumber") ?: "", + carrier = getValOr(shippingDetails, "carrier") ?: "", address = address ) } diff --git a/ios/Mappers.swift b/ios/Mappers.swift index 1909f776c..fcaee3a2f 100644 --- a/ios/Mappers.swift +++ b/ios/Mappers.swift @@ -548,6 +548,11 @@ class Mappers { let shipping = STPPaymentIntentShippingDetailsParams(address: shippingAddress, name: shippingDetails["name"] as? String ?? "") + // add the phone number, trackingNumber and carrie if available in the shipping details + shipping.phone = shippingDetails["phone"] as? String ?? "" + shipping.trackingNumber = shippingDetails["trackingNumber"] as? String ?? "" + shipping.carrier = shippingDetails["carrier"] as? String ?? "" + return shipping }