Skip to content

Conversation

@fhdeodato
Copy link

added the phone number, tracking number and carrier to the shipping details if data is available

this fixes #1548

Summary

Added to the mappers the trackingNumber, carrier and phone number to the shipping details

Motivation

This will help to have more complete data in the stripe's dashboard, as mentioned in the following issue

#1548

Android Change

File - stripe-react-native/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt
Line - 608

  return ConfirmPaymentIntentParams.Shipping(
    name = getValOr(shippingDetails, "name") ?: "",
    phone = getValOr(shippingDetails, "phone") ?: "",
    trackingNumber = getValOr(shippingDetails, "trackingNumber") ?: "",
    carrier = getValOr(shippingDetails, "carrier") ?: "",
    address = address
  )

iOS Change

File - stripe-react-native/ios/Mappers.swift
Line - 551

        // 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 ?? ""

Testing

  • I tested this manually
  • I added automated tests

image

Documentation

Select one:

  • I have added relevant documentation for my changes.
  • This PR does not result in any developer-facing changes.

@cla-assistant
Copy link

cla-assistant bot commented Dec 13, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shipping details is not sending all parameters to the sdk

1 participant