From 6da8194332b3dd5e5706662a0691e17a6ff2f7e4 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Fri, 13 Nov 2015 15:40:42 +0200 Subject: [PATCH] Working on Mollie Pay --- app/Http/Controllers/PaymentController.php | 7 +++++-- app/Http/routes.php | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/PaymentController.php b/app/Http/Controllers/PaymentController.php index 17331f21ac4f..3b9f1269a124 100644 --- a/app/Http/Controllers/PaymentController.php +++ b/app/Http/Controllers/PaymentController.php @@ -141,7 +141,8 @@ class PaymentController extends BaseController if ($useToken || $paymentType != PAYMENT_TYPE_CREDIT_CARD || $gateway->id == GATEWAY_EWAY || $gateway->id == GATEWAY_TWO_CHECKOUT - || $gateway->id == GATEWAY_PAYFAST) { + || $gateway->id == GATEWAY_PAYFAST + || $gateway->id == GATEWAY_MOLLIE) { if (Session::has('error')) { Session::reflash(); return Redirect::to('view/'.$invitationKey); @@ -487,7 +488,9 @@ class PaymentController extends BaseController } try { - if (method_exists($gateway, 'completePurchase') && !$accountGateway->isGateway(GATEWAY_TWO_CHECKOUT)) { + if (method_exists($gateway, 'completePurchase') + && !$accountGateway->isGateway(GATEWAY_TWO_CHECKOUT) + && !$accountGateway->isGateway(GATEWAY_MOLLIE)) { // TODO: implement webhook $details = $this->paymentService->getPaymentDetails($invitation, $accountGateway); $response = $gateway->completePurchase($details)->send(); $ref = $response->getTransactionReference() ?: $token; diff --git a/app/Http/routes.php b/app/Http/routes.php index 522110b3713f..a3b120ff9a6f 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -392,8 +392,9 @@ if (!defined('CONTACT_EMAIL')) { define('PAYMENT_LIBRARY_PHP_PAYMENTS', 2); define('GATEWAY_AUTHORIZE_NET', 1); - define('GATEWAY_EWAY', 4); define('GATEWAY_AUTHORIZE_NET_SIM', 2); + define('GATEWAY_EWAY', 4); + define('GATEWAY_MOLLIE', 9); define('GATEWAY_PAYFAST', 13); define('GATEWAY_PAYPAL_EXPRESS', 17); define('GATEWAY_PAYPAL_PRO', 18);