Merge pull request #5674 from turbo124/v5-develop

Fixes for Stripe Connect
This commit is contained in:
David Bomba 2021-05-12 00:41:11 +10:00 committed by GitHub
commit 6ca3ec9c58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 7 deletions

View File

@ -148,6 +148,6 @@ return [
'disable_auto_update' => env('DISABLE_AUTO_UPDATE', false),
'invoiceninja_hosted_pdf_generation' => env('NINJA_HOSTED_PDF', false),
'ninja_stripe_key' => env('NINJA_STRIPE_KEY', null),
'ninja_stripe_publishable_key' => env('NINJA_PUBLISHABLE_KEY=', null),
'ninja_stripe_publishable_key' => env('NINJA_PUBLISHABLE_KEY', null),
'pdf_generator' => env('PDF_GENERATOR', false),
];

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,7 @@
"/js/clients/payments/checkout-credit-card.js": "/js/clients/payments/checkout-credit-card.js?id=98e406fa8e4db0e93427",
"/js/clients/payments/stripe-ach.js": "/js/clients/payments/stripe-ach.js?id=76d8ba6a814b3015e359",
"/js/clients/payments/stripe-alipay.js": "/js/clients/payments/stripe-alipay.js?id=665ddf663500767f1a17",
"/js/clients/payments/stripe-credit-card.js": "/js/clients/payments/stripe-credit-card.js?id=5a9eaeb24652ce0e87c9",
"/js/clients/payments/stripe-credit-card.js": "/js/clients/payments/stripe-credit-card.js?id=f1719b79a2bb274d3f64",
"/js/clients/payments/stripe-sofort.js": "/js/clients/payments/stripe-sofort.js?id=08bf4871826e8b18b804",
"/js/clients/quotes/action-selectors.js": "/js/clients/quotes/action-selectors.js?id=1b8f9325aa6e8595e7fa",
"/js/clients/quotes/approve.js": "/js/clients/quotes/approve.js?id=85bcae0a646882e56b12",

View File

@ -17,10 +17,18 @@ class StripeCreditCard {
}
setupStripe() {
this.stripe = Stripe(this.key);
if (this.stripeConnect)
this.stripe.stripeAccount = this.stripeConnect;
if (this.stripeConnect){
// this.stripe.stripeAccount = this.stripeConnect;
this.stripe = Stripe(this.key, {
stripeAccount: this.stripeConnect,
});
}
else {
this.stripe = Stripe(this.key);
}
this.elements = this.stripe.elements();