2017-01-30 20:40:43 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Ninja\PaymentDrivers;
|
2016-06-20 16:14:43 +02:00
|
|
|
|
2017-08-14 18:33:11 +02:00
|
|
|
use Exception;
|
|
|
|
|
2016-06-20 16:14:43 +02:00
|
|
|
class CybersourcePaymentDriver extends BasePaymentDriver
|
|
|
|
{
|
|
|
|
protected $transactionReferenceParam = 'transaction_uuid';
|
|
|
|
|
2016-07-21 14:35:23 +02:00
|
|
|
public function completeOffsitePurchase($input)
|
2016-06-20 16:14:43 +02:00
|
|
|
{
|
|
|
|
if ($input['decision'] == 'ACCEPT') {
|
|
|
|
return $this->createPayment($input['bill_trans_ref_no']);
|
|
|
|
} else {
|
|
|
|
throw new Exception($input['message'] . ': ' . $input['invalid_fields']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|