invoiceninja/app/Ninja/PaymentDrivers/CybersourcePaymentDriver.php

18 lines
462 B
PHP
Raw Normal View History

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