~singpolyma/jmp-pay

2bc36ccccba441dee198a97d3d392dbb64e74290 — Stephen Paul Weber 7 months ago fbe48a1
Update 3DS for new visa requirements
2 files changed, 5 insertions(+), 2 deletions(-)

M config.ru
M views/credit_cards.slim
M config.ru => config.ru +1 -0
@@ 343,6 343,7 @@ class JmpPay < Roda
					view(
						"credit_cards",
						locals: {
							jid: jid,
							token: gateway.client_token,
							customer_id: gateway.customer_id,
							antifraud: atfd,

M views/credit_cards.slim => views/credit_cards.slim +4 -2
@@ 39,7 39,7 @@ form method="post" action=""
	input type="hidden" name="atfd" value=antifraud
	input type="hidden" name="braintree_nonce"

script src="https://js.braintreegateway.com/web/dropin/1.33.0/js/dropin.js"
script src="https://js.braintreegateway.com/web/dropin/1.42.0/js/dropin.js"
javascript:
	document.querySelector("#braintree").innerHTML = "";



@@ 101,7 101,9 @@ javascript:
			instance.requestPaymentMethod({
				threeDSecure: {
					amount: document.querySelector("input[name=amount]").value || "0.0",
					requireChallenge: true
					requireChallenge: true,
					collectDeviceData: true,
					email: "#{jid.sub(/@cheogram.com$/, "").gsub(/(%5[cC])|\//, "=")}@smtp.cheogram.com"
				}
			}, function(err, payload) {
				if(err) {