mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 06:34:35 -04:00
eway
This commit is contained in:
parent
c2a1207a63
commit
120038d616
@ -82,7 +82,7 @@ class Gateway extends StaticModel
|
|||||||
return [GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true]];//Authorize.net
|
return [GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true]];//Authorize.net
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
return [GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true]];//eWay
|
return [GatewayType::CREDIT_CARD => ['refund' => false, 'token_billing' => true]];//eWay
|
||||||
break;
|
break;
|
||||||
case 15:
|
case 15:
|
||||||
return [GatewayType::PAYPAL => ['refund' => true, 'token_billing' => false]]; //Paypal
|
return [GatewayType::PAYPAL => ['refund' => true, 'token_billing' => false]]; //Paypal
|
||||||
|
@ -129,7 +129,7 @@ class CreditCard
|
|||||||
if(boolval($request->input('store_card')))
|
if(boolval($request->input('store_card')))
|
||||||
{
|
{
|
||||||
$token = $this->createEwayToken($request->input('securefieldcode'));
|
$token = $this->createEwayToken($request->input('securefieldcode'));
|
||||||
$payment = $this->tokenBilling($token, $this->eway_driver->payment_hash);
|
$payment = $this->tokenBilling($token->token, $this->eway_driver->payment_hash);
|
||||||
|
|
||||||
return redirect()->route('client.payments.show', ['payment' => $this->encodePrimaryKey($payment->id)]);
|
return redirect()->route('client.payments.show', ['payment' => $this->encodePrimaryKey($payment->id)]);
|
||||||
|
|
||||||
|
@ -89,6 +89,7 @@ class EwayPaymentDriver extends BaseDriver
|
|||||||
return $this->payment_method->paymentResponse($request); //this is your custom implementation from here
|
return $this->payment_method->paymentResponse($request); //this is your custom implementation from here
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* We need PCI compliance prior to enabling this */
|
||||||
public function refund(Payment $payment, $amount, $return_client_response = false)
|
public function refund(Payment $payment, $amount, $return_client_response = false)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -99,7 +100,7 @@ class EwayPaymentDriver extends BaseDriver
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->init()->eway->client->refund($refund);
|
$response = $this->init()->eway->refund($refund);
|
||||||
|
|
||||||
$transaction_reference = '';
|
$transaction_reference = '';
|
||||||
$refund_status = true;
|
$refund_status = true;
|
||||||
@ -118,6 +119,7 @@ class EwayPaymentDriver extends BaseDriver
|
|||||||
$refund_message = 'Sorry, your refund failed';
|
$refund_message = 'Sorry, your refund failed';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'transaction_reference' => $response->TransactionID,
|
'transaction_reference' => $response->TransactionID,
|
||||||
'transaction_response' => json_encode($response),
|
'transaction_response' => json_encode($response),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user