mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-20 08:21:34 +02:00
30 lines
662 B
PHP
30 lines
662 B
PHP
<?php
|
|
|
|
namespace App\Ninja\PaymentDrivers;
|
|
|
|
/**
|
|
* Class CybersourcePaymentDriver
|
|
*/
|
|
class CybersourcePaymentDriver extends BasePaymentDriver
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected $transactionReferenceParam = 'transaction_uuid';
|
|
|
|
/**
|
|
* @param array $input
|
|
*
|
|
* @return \App\Models\Payment|mixed
|
|
* @throws Exception
|
|
*/
|
|
public function completeOffsitePurchase(array $input)
|
|
{
|
|
if ($input['decision'] == 'ACCEPT') {
|
|
return $this->createPayment($input['bill_trans_ref_no']);
|
|
} else {
|
|
throw new Exception($input['message'] . ': ' . $input['invalid_fields']);
|
|
}
|
|
}
|
|
}
|