mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Update AuthorizeCreditCard.php
This commit is contained in:
parent
63c0363f19
commit
26966090a4
@ -211,12 +211,20 @@ class AuthorizeCreditCard
|
|||||||
{
|
{
|
||||||
$response = $data['response'];
|
$response = $data['response'];
|
||||||
|
|
||||||
|
$code = '';
|
||||||
|
$description = '';
|
||||||
|
|
||||||
|
if($response->getTransactionResponse()->getMessages() !== null){
|
||||||
|
$code = $response->getTransactionResponse()->getMessages()[0]->getCode();
|
||||||
|
$description = $response->getTransactionResponse()->getMessages()[0]->getDescription();
|
||||||
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'transaction_reference' => $response->getTransactionResponse()->getTransId(),
|
'transaction_reference' => $response->getTransactionResponse()->getTransId(),
|
||||||
'amount' => $vars['amount'],
|
'amount' => $vars['amount'],
|
||||||
'auth_code' => $response->getTransactionResponse()->getAuthCode(),
|
'auth_code' => $response->getTransactionResponse()->getAuthCode(),
|
||||||
'code' => $response->getTransactionResponse()->getMessages()[0]->getCode(),
|
'code' => $code,
|
||||||
'description' => $response->getTransactionResponse()->getMessages()[0]->getDescription(),
|
'description' => $description,
|
||||||
'invoices' => $vars['invoices'],
|
'invoices' => $vars['invoices'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user