Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

on device tip amount returns null on ios #854

Open
jp7 opened this issue Nov 15, 2024 · 1 comment
Open

on device tip amount returns null on ios #854

jp7 opened this issue Nov 15, 2024 · 1 comment
Assignees

Comments

@jp7
Copy link

jp7 commented Nov 15, 2024

Describe the bug
on device tip amount returns null on ios instead of returning the amount entered on the reader device

To Reproduce
Steps to reproduce the behavior:

  1. Connect to a wisepad reader with a location with tipping enabled
  2. create a payment intent
  3. add a tip amount
  4. inspect/log payment intent returned and see
"amountDetails": {
    "tip": {
      "amount": null
    }
  },

Expected behavior
I would expect the tip amount to be returned under amountDetails.tip.amount

Screenshots
If applicable, add screenshots to help explain your problem.

Stripe Terminal React Native SDK version

  • (e.g., ^0.0.1-beta.22)

Smartphone (please complete the following information):

  • Device: Ipad 6th Gen
  • OS: 17.7.1

Additional context
I was looking at the ios code here and I think this should be:

    class func mapFromAmountDetails(_ amountDetails: SCPAmountDetails?) -> NSDictionary {
        let amount: NSDictionary = [
            "amount": amountDetails?.tip?.amount ?? NSNull(),  // need to add  ?.amount
        ]

        let result: NSDictionary = [
            "tip": amount
        ]

        return result
    }
@tim-lin-bbpos
Copy link
Collaborator

Thanks for your voice and we'll fix it in the next release.

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

No branches or pull requests

2 participants