Skip to content

Commit

Permalink
Stripe 2020-08-27
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed Jun 21, 2024
1 parent ee20948 commit 99651c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/Subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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'],
Expand Down
1 change: 1 addition & 0 deletions conf/general-example
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 99651c8

Please sign in to comment.