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

tipUnits is incorrect value #145

Closed
RichAppz opened this issue Apr 5, 2022 · 3 comments · Fixed by #206
Closed

tipUnits is incorrect value #145

RichAppz opened this issue Apr 5, 2022 · 3 comments · Fixed by #206

Comments

@RichAppz
Copy link

RichAppz commented Apr 5, 2022

Summary

The tipping value is not in the response of the SCPProcessPaymentCompletionBlock for WisePad3

Code to reproduce

Reproducible every time I make a payment Terminal.shared.processPayment

iOS version

15.3.1

Installation method

Cocoapod

SDK version

v2.7.0

Other information

This had a tipping unit of 100 and it is not visible.

Screenshot 2022-04-05 at 09 48 28

@RichAppz RichAppz mentioned this issue Apr 5, 2022
@RichAppz
Copy link
Author

This has been a while now, would you be able to provide an update on this issue.

Thanks

@bric-stripe
Copy link
Collaborator

bric-stripe commented Apr 26, 2022

@RichAppz sorry this has gone without a response. All the fields in the metadata of a PaymentIntent are managed by your integration. So tipUnits would need to be filled in by your integration. But I just investigated where this should be in the PaymentIntent instance and it isn't yet exposed from the SDK in the SCPPaymentIntent proper.

Not the friendliest interface but to unblock for now you should be able to get it from the payment intent's originalJSON which has the API response and the tipping info should be in total_details:

(lldb) po processedIntent?.originalJSON["total_details"]
▿ Optional<Any>
  ▿ some : 2 elements
    ▿ 0 : 2 elements
      - key : amount_tip
      - value : 16
    ▿ 1 : 2 elements
      - key : amount_tax
      - value : 0

@bric-stripe
Copy link
Collaborator

👋 I realize this has been a while but wanted to update that amountDetails will be provided on PaymentIntent in our late January release.

This was referenced Jan 30, 2023
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 a pull request may close this issue.

2 participants