mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Stripe refunds
This commit is contained in:
parent
4d2d41123b
commit
f6f999b801
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com)
|
||||||
*
|
*
|
||||||
@ -315,32 +316,30 @@ class StripePaymentDriver extends BasePaymentDriver
|
|||||||
->send();
|
->send();
|
||||||
|
|
||||||
if ($response->isSuccessful()) {
|
if ($response->isSuccessful()) {
|
||||||
SystemLogger::dispatch(
|
SystemLogger::dispatch([
|
||||||
[
|
'server_response' => $response->getMessage(), 'data' => request()->all(),
|
||||||
'server_response' => $response->getMessage(),
|
], SystemLog::CATEGORY_GATEWAY_RESPONSE, SystemLog::EVENT_GATEWAY_SUCCESS, SystemLog::TYPE_STRIPE, $this->client);
|
||||||
'data' => request()->all(),
|
|
||||||
],
|
|
||||||
SystemLog::CATEGORY_GATEWAY_RESPONSE,
|
|
||||||
SystemLog::EVENT_GATEWAY_SUCCESS,
|
|
||||||
SystemLog::TYPE_PAYPAL,
|
|
||||||
$this->client
|
|
||||||
);
|
|
||||||
|
|
||||||
return true;
|
return [
|
||||||
|
'transaction_reference' => $response->getData()['id'],
|
||||||
|
'transaction_response' => json_encode($response->getData()),
|
||||||
|
'success' => $response->getData()['refunded'],
|
||||||
|
'description' => $response->getData()['description'],
|
||||||
|
'code' => $response->getCode(),
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemLogger::dispatch(
|
SystemLogger::dispatch([
|
||||||
[
|
'server_response' => $response->getMessage(), 'data' => request()->all(),
|
||||||
'server_response' => $response->getMessage(),
|
], SystemLog::CATEGORY_GATEWAY_RESPONSE, SystemLog::EVENT_GATEWAY_FAILURE, SystemLog::TYPE_STRIPE, $this->client);
|
||||||
'data' => request()->all(),
|
|
||||||
],
|
|
||||||
SystemLog::CATEGORY_GATEWAY_RESPONSE,
|
|
||||||
SystemLog::EVENT_GATEWAY_FAILURE,
|
|
||||||
SystemLog::TYPE_PAYPAL,
|
|
||||||
$this->client
|
|
||||||
);
|
|
||||||
|
|
||||||
return false;
|
return [
|
||||||
|
'transaction_reference' => null,
|
||||||
|
'transaction_response' => json_encode($response->getData()),
|
||||||
|
'success' => false,
|
||||||
|
'description' => $response->getData()['error']['message'],
|
||||||
|
'code' => $response->getData()['error']['code'],
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function verificationView(ClientGatewayToken $payment_method)
|
public function verificationView(ClientGatewayToken $payment_method)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user