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

[NT-261] Pass refParam with Apple Pay backings #842

Merged
merged 4 commits into from
Sep 17, 2019
Merged

Conversation

ifbarrera
Copy link
Contributor

@ifbarrera ifbarrera commented Sep 16, 2019

πŸ“² What

Passes through the refTag from the project page all the way to the createApplePayBacking request.

πŸ€” Why

So we can track the referrer on Apple Pay backings.

πŸ›  How

Passes the RefTag from the project page to the PledgeViewController, which then passes it as part of the mutation input for the createApplePayBacking mutation. The refTag is always optional.

βœ… Acceptance criteria

To test Apple Pay transactions, you must run the app on a device that is Apple Pay capable.

  • On Staging, with the Native Checkout and Native Pledge Screen feature flags turned ON, from "Discovery", navigate to any project and select any reward. You should see the "Apple Pay" button. Tap the "Apple Pay" button and complete the transaction. In the console, you should see βšͺ️ [KsApi] Input: which will show you the mutation input for the createApplePayBacking mutation. In the input, you should see the key refParam.

Copy link
Contributor

@dusi dusi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works like a charm

Approved even though I had 1 question (feel free to ping me back if you're going to address it or not - I can do a quick re-review).

Those test descriptions were super helpful, thank you for providing those!

let pledgeViewController = PledgeViewController.instantiate()
pledgeViewController.configureWith(project: project, reward: reward)
pledgeViewController.configureWith(project: project, reward: reward, refTag: refTag)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also inject refTag from ManageViewPledgeViewController or is it not going to be necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, I think it's not necessary. The updateBackingPaymentSource mutation doesn't currently accept a refParam. I'd imagine that for updating your backing, the backend would automatically set the referrer as update_pledge or something like that, since there's no real "referrer" for updating a pledge. I'll double check with product though. Regardless I think if we wanted to pass the refParam with the updateBackingPaymentSource mutation that would be in a separate PR.

}
selectedShippingRule,
refTag
).map { $0 as CreateBackingData }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this!

@ifbarrera ifbarrera merged commit 48202e4 into master Sep 17, 2019
@ifbarrera ifbarrera deleted the apple-pay-ref branch September 17, 2019 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants