Skip to content

Commit

Permalink
Fixes issue when coupons are enabled and processing one time #167
Browse files Browse the repository at this point in the history
  • Loading branch information
andrelopez committed Feb 28, 2021
1 parent c4c64d8 commit 194d857
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/services/Checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,10 @@ public function createCheckoutSession(PaymentForm $form, $postData)
}

if ($allowPromotionCodes) {
$sessionParams['subscription_data']['payment_behavior'] = 'allow_incomplete';
if ($form->enableSubscriptions || $isCustomAmount) {
$sessionParams['subscription_data']['payment_behavior'] = 'allow_incomplete';
}

$sessionParams['allow_promotion_codes'] = true;
}

Expand Down

0 comments on commit 194d857

Please sign in to comment.