eway
This commit is contained in:
parent
c2a1207a63
commit
120038d616
3 changed files with 5 additions and 3 deletions
|
|
@ -82,7 +82,7 @@ class Gateway extends StaticModel
|
|||
return [GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true]];//Authorize.net
|
||||
break;
|
||||
case 3:
|
||||
return [GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true]];//eWay
|
||||
return [GatewayType::CREDIT_CARD => ['refund' => false, 'token_billing' => true]];//eWay
|
||||
break;
|
||||
case 15:
|
||||
return [GatewayType::PAYPAL => ['refund' => true, 'token_billing' => false]]; //Paypal
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ class CreditCard
|
|||
if(boolval($request->input('store_card')))
|
||||
{
|
||||
$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)]);
|
||||
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ class EwayPaymentDriver extends BaseDriver
|
|||
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)
|
||||
{
|
||||
|
||||
|
|
@ -99,7 +100,7 @@ class EwayPaymentDriver extends BaseDriver
|
|||
],
|
||||
];
|
||||
|
||||
$response = $this->init()->eway->client->refund($refund);
|
||||
$response = $this->init()->eway->refund($refund);
|
||||
|
||||
$transaction_reference = '';
|
||||
$refund_status = true;
|
||||
|
|
@ -118,6 +119,7 @@ class EwayPaymentDriver extends BaseDriver
|
|||
$refund_message = 'Sorry, your refund failed';
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
'transaction_reference' => $response->TransactionID,
|
||||
'transaction_response' => json_encode($response),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue