question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docs for paymentRequestWithNativePay incomplete/inconsistent

See original GitHub issue

Before I have submitted the issue

[x] I have read an installation guide
[x] I know that for an iOS I need to install pods because I’ve read the installation guide
[x] I have read a linking guide and checked that everything is OK like in manual linking guide
[x] I know that before using tipsi-stripe I need to set options for my app as described in usage guide

The problem

The methods signatures for paymentRequestWithApplePay(items, options) and paymentRequestWithNativePay(options, items) are inconsistent.

https://github.com/tipsi/tipsi-stripe/blob/master/src/Stripe.js#L74

vs.

https://github.com/tipsi/tipsi-stripe/blob/master/src/Stripe.js#L87

Also, the documentation mentions that paymentRequestWithNativePay is preferred, but doesn’t indicate the new parameter order.

The Solution

Update docs or change method signatures to always go in (items, options) order.

Environment

  • tipsi-stripe version: Latest

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:10
  • Comments:6

github_iconTop GitHub Comments

1reaction
baugartencommented, Jan 24, 2020

@Adokiye I found the source code to be the most useful documentation for this project.

You can see the interfaces here https://github.com/tipsi/tipsi-stripe/blob/d9c8be08b7ce3757f6bc5ee5198f46c63a38e2c1/src/Stripe.js#L64 which is helpful for knowing which interface methods expect which types.

And https://github.com/tipsi/tipsi-stripe/blob/d9c8be08b7ce3757f6bc5ee5198f46c63a38e2c1/src/utils/types.js#L132 for seeing the type definitions

0reactions
Adokiyecommented, Jan 24, 2020

Can’t find the documentation for paymentRequestWithNativePay anywhere, please can someone post a link or something, I don’t even know the parameters to pass to the endpoint

Read more comments on GitHub >

github_iconTop Results From Across the Web

paymentRequestWithNativePay(options, [items]) -> Promise
Launches the Native Pay view to accept payment. iOS. options — An object with the following keys: Key, Type ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found