1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-18 00:53:10 +01:00

Fixed problem with PayFast integration

This commit is contained in:
Hillel Coren 2015-11-02 11:47:47 +02:00
parent bbc6d015e8
commit c130e67e54
4 changed files with 8 additions and 3 deletions

View File

@ -182,7 +182,9 @@ class PaymentController extends BaseController
// Handle offsite payments // Handle offsite payments
if ($useToken || $paymentType != PAYMENT_TYPE_CREDIT_CARD if ($useToken || $paymentType != PAYMENT_TYPE_CREDIT_CARD
|| $gateway->id == GATEWAY_EWAY || $gateway->id == GATEWAY_TWO_CHECKOUT) { || $gateway->id == GATEWAY_EWAY
|| $gateway->id == GATEWAY_TWO_CHECKOUT
|| $gateway->id == GATEWAY_PAYFAST) {
if (Session::has('error')) { if (Session::has('error')) {
Session::reflash(); Session::reflash();
return Redirect::to('view/'.$invitationKey); return Redirect::to('view/'.$invitationKey);
@ -449,6 +451,8 @@ class PaymentController extends BaseController
$ref = $response->getData()['AccessCode']; $ref = $response->getData()['AccessCode'];
} elseif ($accountGateway->gateway_id == GATEWAY_TWO_CHECKOUT) { } elseif ($accountGateway->gateway_id == GATEWAY_TWO_CHECKOUT) {
$ref = $response->getData()['cart_order_id']; $ref = $response->getData()['cart_order_id'];
} elseif ($accountGateway->gateway_id == GATEWAY_PAYFAST) {
$ref = $response->getData()['m_payment_id'];
} else { } else {
$ref = $response->getTransactionReference(); $ref = $response->getTransactionReference();
} }

View File

@ -382,6 +382,7 @@ if (!defined('CONTACT_EMAIL')) {
define('GATEWAY_AUTHORIZE_NET', 1); define('GATEWAY_AUTHORIZE_NET', 1);
define('GATEWAY_EWAY', 4); define('GATEWAY_EWAY', 4);
define('GATEWAY_AUTHORIZE_NET_SIM', 2); define('GATEWAY_AUTHORIZE_NET_SIM', 2);
define('GATEWAY_PAYFAST', 13);
define('GATEWAY_PAYPAL_EXPRESS', 17); define('GATEWAY_PAYPAL_EXPRESS', 17);
define('GATEWAY_PAYPAL_PRO', 18); define('GATEWAY_PAYPAL_PRO', 18);
define('GATEWAY_STRIPE', 23); define('GATEWAY_STRIPE', 23);

View File

@ -19,7 +19,7 @@
"anahkiasen/former": "4.0.*@dev", "anahkiasen/former": "4.0.*@dev",
"barryvdh/laravel-debugbar": "~2.0.2", "barryvdh/laravel-debugbar": "~2.0.2",
"chumper/datatable": "dev-develop#7fa47cb", "chumper/datatable": "dev-develop#7fa47cb",
"omnipay/omnipay": "2.3.x", "omnipay/omnipay": "~2.3.0",
"intervention/image": "dev-master", "intervention/image": "dev-master",
"webpatser/laravel-countries": "dev-master", "webpatser/laravel-countries": "dev-master",
"barryvdh/laravel-ide-helper": "2.0.x", "barryvdh/laravel-ide-helper": "2.0.x",

2
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "70ef9e09bca60a19c396c138d8a01d50", "hash": "d0f3825f6d361f655c7393dd024b676e",
"packages": [ "packages": [
{ {
"name": "alfaproject/omnipay-neteller", "name": "alfaproject/omnipay-neteller",