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

[Feature] Support coupon code on Apple Pay #2278

Open
JoeyLeeMEA opened this issue Feb 10, 2023 · 3 comments
Open

[Feature] Support coupon code on Apple Pay #2278

JoeyLeeMEA opened this issue Feb 10, 2023 · 3 comments
Labels
kind:improvement triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@JoeyLeeMEA
Copy link

Is your feature request related to a problem? Please describe.

STRApplePayContext class is used for Apple Pay implementation and it provides a simple interface defined in ApplePayContextDelegate which is great. But unfortunately it doesn't support coupons which was introduced on iOS 15. Currently there is no way to detect if users enter the coupon code on the Apple Pay dialog.

Describe the solution you'd like

Plesase internally implement paymentAuthorizationViewController(_:didChangeCouponCode:handler:) defined in PKPaymentAuthorizationViewControllerDelegate protocol.
https://developer.apple.com/documentation/passkit/pkpaymentauthorizationviewcontrollerdelegate/3752107-paymentauthorizationviewcontroll

And provide a relevant function in ApplePayContextDelegate.

Additional context

To enable the coupon code text field on Apple Pay dialog(PKPaymentAuthorizationViewController), set supportsCouponCode to true in PKPaymentRequest

For example:

let paymentRequest = StripeAPI.paymentRequest(withMerchantIdentifier: merchantIdentifier, country: "US", currency: "USD")
paymentRequest.supportsCouponCode = true
@eurias-stripe
Copy link
Contributor

Thanks for the suggestion @JoeyLeeMEA, we'll look into it and prioritize it accordingly.

@eurias-stripe eurias-stripe added the triaged Issue has been reviewed by Stripe and is being tracked internally label Feb 13, 2023
@jaredmg75
Copy link

Has this feature request been implemented or is it going to be prioritized in the near future?

jaredmg75 added a commit to CommentSold/stripe-ios that referenced this issue Feb 12, 2024
- Update the STPApplePayContextDelegate protocol to include an optional function for when the coupon code changes.
- Update the STPApplePayContext delegate mapping to include our new coupon delegate function.
- Add the paymentAuthorizationController delegate function to STPApplePayContext to broker coupon changes between Apple Pay and the host app.

Feature Request: stripe#2278
jaredmg75 added a commit to CommentSold/stripe-ios that referenced this issue Feb 12, 2024
- Update the STPApplePayContextDelegate protocol to include an optional function for when the coupon code changes.
- Update the STPApplePayContext delegate mapping to include our new coupon delegate function.
- Add the paymentAuthorizationController delegate function to STPApplePayContext to broker coupon changes between Apple Pay and the host app.

Feature Request: stripe#2278
jaredmg75 added a commit to CommentSold/stripe-ios that referenced this issue Feb 12, 2024
- Update the STPApplePayContextDelegate protocol to include an optional function for when the coupon code changes.
- Update the STPApplePayContext delegate mapping to include our new coupon delegate function.
- Add the paymentAuthorizationController delegate function to STPApplePayContext to broker coupon changes between Apple Pay and the host app.

Feature Request: stripe#2278
@JoeyLeeMEA
Copy link
Author

@eurias-stripe Could we get an update on this feature request? The delay is impacting our project, and we would appreciate any info on the timeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:improvement triaged Issue has been reviewed by Stripe and is being tracked internally
Projects
None yet
Development

No branches or pull requests

3 participants