From ed48fb1a3fe212d51784bec97f5e5fbcf1f69b12 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Wed, 9 Mar 2016 16:58:21 +0200 Subject: [PATCH] Fix for checkouit.com integration --- app/Http/Controllers/PublicClientController.php | 3 +++ app/Services/AccountGatewayService.php | 2 +- resources/views/partials/checkout_com_payment.blade.php | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/PublicClientController.php b/app/Http/Controllers/PublicClientController.php index 4b020d482a..93384037bf 100644 --- a/app/Http/Controllers/PublicClientController.php +++ b/app/Http/Controllers/PublicClientController.php @@ -101,7 +101,9 @@ class PublicClientController extends BaseController // Checkout.com requires first getting a payment token $checkoutComToken = false; $checkoutComKey = false; + $checkoutComDebug = false; if ($accountGateway = $account->getGatewayConfig(GATEWAY_CHECKOUT_COM)) { + $checkoutComDebug = $accountGateway->getConfigField('testMode'); if ($checkoutComToken = $this->paymentService->getCheckoutComToken($invitation)) { $checkoutComKey = $accountGateway->getConfigField('publicApiKey'); $invitation->transaction_reference = $checkoutComToken; @@ -126,6 +128,7 @@ class PublicClientController extends BaseController 'paymentURL' => $paymentURL, 'checkoutComToken' => $checkoutComToken, 'checkoutComKey' => $checkoutComKey, + 'checkoutComDebug' => $checkoutComDebug, 'phantomjs' => Input::has('phantomjs'), ); diff --git a/app/Services/AccountGatewayService.php b/app/Services/AccountGatewayService.php index 61d5a9a80e..bd5635e0dd 100644 --- a/app/Services/AccountGatewayService.php +++ b/app/Services/AccountGatewayService.php @@ -41,7 +41,7 @@ class AccountGatewayService extends BaseService [ 'name', function ($model) { - return link_to("gateways/{$model->public_id}/edit", $model->name); + return link_to("gateways/{$model->public_id}/edit", $model->name)->toHtml(); } ], [ diff --git a/resources/views/partials/checkout_com_payment.blade.php b/resources/views/partials/checkout_com_payment.blade.php index 9e5e63baae..c78793a28f 100644 --- a/resources/views/partials/checkout_com_payment.blade.php +++ b/resources/views/partials/checkout_com_payment.blade.php @@ -3,7 +3,7 @@