lib/customer.rb 🔗
@@ -74,8 +74,7 @@ class Customer
end
def payment_methods
- @payment_methods ||=
- BRAINTREE
+ BRAINTREE
.customer
.find(@customer_id)
.then(PaymentMethods.method(:for_braintree_customer))
Stephen Paul Weber created
lib/customer.rb | 3 +--
lib/registration.rb | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
@@ -74,8 +74,7 @@ class Customer
end
def payment_methods
- @payment_methods ||=
- BRAINTREE
+ BRAINTREE
.customer
.find(@customer_id)
.then(PaymentMethods.method(:for_braintree_customer))
@@ -208,7 +208,7 @@ class Registration
def oob
oob = OOB.find_or_create(@reply.command)
oob.url = CONFIG[:credit_card_url].call(
- @reply.to.stripped.to_s,
+ reply.to.stripped.to_s.gsub("\\", "%5C"),
@customer.customer_id
)
oob.desc = "Add credit card, then return here and choose next"
@@ -264,7 +264,7 @@ class Registration
def decline_oob(reply)
oob = OOB.find_or_create(reply.command)
oob.url = CONFIG[:credit_card_url].call(
- reply.to.stripped.to_s,
+ reply.to.stripped.to_s.gsub("\\", "%5C"),
@customer.customer_id
)
oob.desc = DECLINE_MESSAGE