diff --git a/CHANGELOG.md b/CHANGELOG.md index 9984395..4f622c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ Changelog -============================== + +## 6.1.0 (2019, November 6) +### Updates +- Ability to set accountId `stripe.setStripeAccount('xxx')` ## 6.0.0 (2019, August 25) ### Updates diff --git a/src/index.d.ts b/src/index.d.ts index 88846d1..11a1a91 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -2,6 +2,7 @@ import { View } from "tns-core-modules/ui/core/view"; export declare class Stripe { constructor(apiKey: string); + setStripeAccount(accountId: string): void; createToken(card: CardCommon, cb: (error: Error, token: Token) => void): void; createPaymentMethod(card: CardCommon, cb: (error: Error, pm: PaymentMethod) => void): void; retrievePaymentIntent(clientSecret: string, cb: (error: Error, pm: StripePaymentIntent) => void): void; @@ -180,4 +181,4 @@ export declare const enum StripeRedirectState { InProgress = 1, Cancelled = 2, Completed = 3 -} +} \ No newline at end of file diff --git a/src/package.json b/src/package.json index 6e4dc7d..b1c335b 100644 --- a/src/package.json +++ b/src/package.json @@ -1,6 +1,6 @@ { "name": "nativescript-stripe", - "version": "6.0.0", + "version": "6.1.0", "description": "NativeScript Stripe sdk", "main": "stripe", "typings": "index.d.ts", diff --git a/src/stripe.android.ts b/src/stripe.android.ts index a56e83f..c00737d 100644 --- a/src/stripe.android.ts +++ b/src/stripe.android.ts @@ -13,6 +13,10 @@ export class Stripe { ); } + setStripeAccount(accountId: string) { + this._stripe.setStripeAccount(accountId); + } + createToken(card: CardCommon, cb: (error: Error, token: Token) => void): void { if (!card) { if (typeof cb === 'function') { diff --git a/src/stripe.ios.ts b/src/stripe.ios.ts index ca6f587..d411d9a 100644 --- a/src/stripe.ios.ts +++ b/src/stripe.ios.ts @@ -8,6 +8,10 @@ export class Stripe { STPPaymentConfiguration.sharedConfiguration().publishableKey = apiKey; } + setStripeAccount(accountId: string) { + STPPaymentConfiguration.sharedConfiguration().stripeAccount = accountId; + } + createToken(card: CardCommon, cb: (error: Error, token: Token) => void): void { if (!card) { if (typeof cb === 'function') {