diff --git a/classes/Subscription.php b/classes/Subscription.php index 9c97be2e80..dbbbaa6962 100644 --- a/classes/Subscription.php +++ b/classes/Subscription.php @@ -117,7 +117,7 @@ private function update_subscription($form_data) { $invoice = \Stripe\Invoice::create([ 'customer' => $this->stripe->customer, 'subscription' => $this->stripe, - 'tax_percent' => 20 + 'tax_rates' => [STRIPE_TAX_RATE], ]); $invoice->finalizeInvoice(); $invoice->pay(); @@ -175,7 +175,7 @@ private function add_subscription($form_data) { $obj = $this->api->createSubscription([ 'payment_behavior' => 'allow_incomplete', 'expand' => ['latest_invoice.payment_intent'], - 'tax_percent' => 20, + 'default_tax_rates' => [STRIPE_TAX_RATE], 'customer' => $customer, 'plan' => $form_data['plan'], 'coupon' => $form_data['coupon'], diff --git a/conf/general-example b/conf/general-example index 8dbd1c87d1..bc0fd896d5 100644 --- a/conf/general-example +++ b/conf/general-example @@ -194,6 +194,7 @@ define('STRIPE_PUBLIC_KEY', ''); define('STRIPE_SECRET_KEY', ''); define('STRIPE_ENDPOINT_SECRET', ''); define('STRIPE_API_VERSION', ''); +define('STRIPE_TAX_RATE', ''); define('REDIS_DB_HOST', 'localhost'); define('REDIS_DB_PORT', '6379'); define('REDIS_DB_NUMBER', '0');