Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Fix incorrect method access. Add usage and code to example app
Browse files Browse the repository at this point in the history
  • Loading branch information
andrepcg committed Sep 5, 2019
1 parent ee98528 commit 1a5a5cc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public void canMakeAndroidPayPayments(final Promise promise) {

@ReactMethod
public void setStripeAccount(final String stripeAccount) {
getPayFlow().setStripeAccount(stripeAccount);
mStripe.setStripeAccount(stripeAccount);
}

@ReactMethod
Expand Down
1 change: 1 addition & 0 deletions example/scripts/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

sed -i.bak 's@<PUBLISHABLE_KEY>@'"$PUBLISHABLE_KEY"'@' src/Root.js
sed -i.bak 's@<MERCHANT_ID>@'"$MERCHANT_ID"'@' src/Root.js
sed -i.bak 's@<STRIPE_ACCOUNT>@'"$STRIPE_ACCOUNT"'@' src/Root.js
rm -rf src/Root.js.bak
2 changes: 2 additions & 0 deletions example/src/Root.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ stripe.setOptions({
androidPayMode: 'test',
})

stripe.setStripeAccount('<STRIPE_ACCOUNT>')

export default class Root extends PureComponent {
state = {
index: 0,
Expand Down
9 changes: 9 additions & 0 deletions website/docs-md/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ stripe.setOptions({
`androidPayMode` _String_ (Android only) - Corresponds to [WALLET_ENVIRONMENT](https://developers.google.com/android/reference/com/google/android/gms/wallet/WalletConstants
).
Can be one of: `test|production`.


### Usage with Stripe Connect

If you're using Connect and need to set a `stripeAccount` do the following:

```js
stripe.setStripeAccount('<ACCT_>')
```

0 comments on commit 1a5a5cc

Please sign in to comment.