From fa48aa2a07ffb739dab76da9f569ca5441bfbd4e Mon Sep 17 00:00:00 2001 From: Jason Judge Date: Thu, 21 Feb 2019 17:36:43 +0000 Subject: [PATCH] Support POST for completeAuthorize and completePurchase Many gateways return with a POST to the merchant site, with POST data containing the result of the authorization. Others use GET. So this supports both. --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 9c6468f..ada498d 100644 --- a/index.php +++ b/index.php @@ -105,7 +105,7 @@ }); // create gateway completeAuthorize -$app->get('/gateways/{name}/completeAuthorize', function($name) use ($app) { +$app->match('/gateways/{name}/completeAuthorize', function($name) use ($app) { $gateway = Omnipay::create($name); $sessionVar = 'omnipay.'.$gateway->getShortName(); $gateway->initialize((array) $app['session']->get($sessionVar)); @@ -117,7 +117,7 @@ 'gateway' => $gateway, 'response' => $response, )); -}); +})->method('get|post'); // create gateway capture $app->get('/gateways/{name}/capture', function($name) use ($app) {