From 48a4363c61afd1fad3a6b738d66b95d294d7cbf6 Mon Sep 17 00:00:00 2001 From: Chris Oliver Date: Mon, 27 Nov 2023 09:18:03 -0600 Subject: [PATCH] Parameterize braintree statuses with underscore to convert spaces properly --- lib/pay/braintree/subscription.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pay/braintree/subscription.rb b/lib/pay/braintree/subscription.rb index 842e9f3c..bc102442 100644 --- a/lib/pay/braintree/subscription.rb +++ b/lib/pay/braintree/subscription.rb @@ -37,7 +37,7 @@ def self.sync(subscription_id, object: nil, name: nil, try: 0, retries: 1) current_period_start: object.billing_period_start_date, payment_method_id: object.payment_method_token, processor_plan: object.plan_id, - status: object.status.underscore, + status: object.status.parameterize(separator: "_"), trial_ends_at: (object.created_at + object.trial_duration.send(object.trial_duration_unit) if object.trial_period) }