From 17831087fe0cac45bc24314ca9be18f91347a7b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Mon, 15 Jun 2020 13:02:44 +0200 Subject: [PATCH] Update secret keys & sandbox --- app/PaymentDrivers/CheckoutComPaymentDriver.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/PaymentDrivers/CheckoutComPaymentDriver.php b/app/PaymentDrivers/CheckoutComPaymentDriver.php index b6f9a457b90f..c12de24154de 100644 --- a/app/PaymentDrivers/CheckoutComPaymentDriver.php +++ b/app/PaymentDrivers/CheckoutComPaymentDriver.php @@ -57,9 +57,13 @@ class CheckoutComPaymentDriver extends BasePaymentDriver public function init() { - $secret_key = $this->company_gateway->getConfig()->secretApiKey; - - $this->gateway = new CheckoutApi($secret_key); // @todo: 2nd (sandbox), 3rd (public) + $config = [ + 'secret' => $this->company_gateway->getConfigField('secretApiKey'), + 'public' => $this->company_gateway->getConfigField('publicApiKey'), + 'sandbox' => $this->company_gateway->getConfigField('testMode'), + ]; + + $this->gateway = new CheckoutApi($config['secret'], $config['sandbox'], $config['public']); } public function viewForType($gateway_type_id)