mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
fixes for eway
This commit is contained in:
parent
f7727da192
commit
68c9ee33af
@ -138,7 +138,7 @@ class CreditCard
|
|||||||
// ],
|
// ],
|
||||||
// 'TransactionType' => \Eway\Rapid\Enum\TransactionType::PURCHASE,
|
// 'TransactionType' => \Eway\Rapid\Enum\TransactionType::PURCHASE,
|
||||||
'Method' => \Eway\Rapid\Enum\PaymentMethod::CREATE_TOKEN_CUSTOMER,
|
'Method' => \Eway\Rapid\Enum\PaymentMethod::CREATE_TOKEN_CUSTOMER,
|
||||||
'SecuredCardData' => $request->input('SecuredCardData'),
|
'SecuredCardData' => $request->input('securefieldcode'),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->eway_driver->init()->eway->createCustomer(\Eway\Rapid\Enum\ApiMethod::DIRECT, $transaction);
|
$response = $this->eway_driver->init()->eway->createCustomer(\Eway\Rapid\Enum\ApiMethod::DIRECT, $transaction);
|
||||||
@ -178,7 +178,8 @@ class CreditCard
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function processPaymentResponse($request)
|
|
||||||
|
public function paymentResponse($request)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,10 +6,10 @@ ctrans('texts.credit_card')])
|
|||||||
|
|
||||||
@section('gateway_content')
|
@section('gateway_content')
|
||||||
<form action="{{ route('client.payment_methods.store', ['method' => App\Models\GatewayType::CREDIT_CARD]) }}"
|
<form action="{{ route('client.payment_methods.store', ['method' => App\Models\GatewayType::CREDIT_CARD]) }}"
|
||||||
method="post" id="payment_form">
|
method="post" id="server-response">
|
||||||
@csrf
|
@csrf
|
||||||
|
|
||||||
<input type="hidden" id="securefieldcode" name="SecuredCardData" value="" />
|
<input type="hidden" id="securefieldcode" name="securefieldcode" value="" />
|
||||||
<input type="hidden" name="company_gateway_id" value="{{ $gateway->company_gateway->id }}">
|
<input type="hidden" name="company_gateway_id" value="{{ $gateway->company_gateway->id }}">
|
||||||
<input type="hidden" name="payment_method_id" value="1">
|
<input type="hidden" name="payment_method_id" value="1">
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ ctrans('texts.credit_card')])
|
|||||||
<!-- Your JS includes go here -->
|
<!-- Your JS includes go here -->
|
||||||
<script src="https://secure.ewaypayments.com/scripts/eWAY.min.js" data-init="false"></script>
|
<script src="https://secure.ewaypayments.com/scripts/eWAY.min.js" data-init="false"></script>
|
||||||
|
|
||||||
@include('portal.ninja2020.gateways.eway.includes.credt_card')
|
@include('portal.ninja2020.gateways.eway.includes.credit_card')
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
@ -93,17 +93,20 @@ function securePanelCallback(event) {
|
|||||||
if (!event.fieldValid) {
|
if (!event.fieldValid) {
|
||||||
alert(getError(event.errors));
|
alert(getError(event.errors));
|
||||||
} else {
|
} else {
|
||||||
var s = document.getElementById("securefieldcode");
|
var s = document.querySelector("input[name=securefieldcode]");
|
||||||
s.value = event.secureFieldCode
|
s.value = event.secureFieldCode
|
||||||
|
console.log(s.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function doneCallback() {
|
function doneCallback() {
|
||||||
var form = document.getElementById("payment_form");
|
console.log("done call bak");
|
||||||
|
var form = document.getElementById("server-response");
|
||||||
form.submit();
|
form.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveAndSubmit() {
|
function saveAndSubmit() {
|
||||||
|
console.log("save and sub");
|
||||||
eWAY.saveAllFields(doneCallback, 2000);
|
eWAY.saveAllFields(doneCallback, 2000);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
<input type="hidden" name="company_gateway_id" value="{{ $gateway->getCompanyGatewayId() }}">
|
<input type="hidden" name="company_gateway_id" value="{{ $gateway->getCompanyGatewayId() }}">
|
||||||
<input type="hidden" name="payment_method_id" value="1">
|
<input type="hidden" name="payment_method_id" value="1">
|
||||||
<input type="hidden" name="token" id="token" value="">
|
<input type="hidden" name="token" id="token" value="">
|
||||||
|
<input type="hidden" name="securefieldcode" value="">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div class="alert alert-failure mb-4" hidden id="errors"></div>
|
<div class="alert alert-failure mb-4" hidden id="errors"></div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user