winter sale: fix error with promotion codes.
Fix an exception when checking out on Stripe caused by using the `allow_promotion_codes` and `discounts` parameters at the same time. Stripe::InvalidRequestError - You may only specify one of these parameters: allow_promotion_codes, discounts
This commit is contained in:
@@ -160,7 +160,7 @@ class UserUpgrade < ApplicationRecord
|
|||||||
client_reference_id: "user_upgrade_#{id}",
|
client_reference_id: "user_upgrade_#{id}",
|
||||||
customer_email: purchaser.email_address&.address,
|
customer_email: purchaser.email_address&.address,
|
||||||
payment_method_types: methods,
|
payment_method_types: methods,
|
||||||
allow_promotion_codes: allow_promotion_codes,
|
allow_promotion_codes: allow_promotion_codes.presence,
|
||||||
line_items: [{
|
line_items: [{
|
||||||
price: price_id,
|
price: price_id,
|
||||||
quantity: 1,
|
quantity: 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user