Bug fix for Braintree client link

This commit is contained in:
Hillel Coren 2016-10-07 08:22:19 +03:00
parent c8eace705d
commit b024f99fbd

View File

@ -91,8 +91,8 @@ class AccountGatewayToken extends Eloquent
if ($accountGateway->gateway_id == GATEWAY_STRIPE) {
return "https://dashboard.stripe.com/customers/{$this->token}";
} elseif ($accountGateway->gateway_id == GATEWAY_BRAINTREE) {
$merchantId = $accountGateway->getConfig()->merchantId;
$testMode = $accountGateway->getConfig()->testMode;
$merchantId = $accountGateway->getConfigField('merchantId');
$testMode = $accountGateway->getConfigField('testMode');
return $testMode ? "https://sandbox.braintreegateway.com/merchants/{$merchantId}/customers/{$this->token}" : "https://www.braintreegateway.com/merchants/{$merchantId}/customers/{$this->token}";
} else {
return false;