mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01: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,
|
||||
'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);
|
||||
@ -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')
|
||||
<form action="{{ route('client.payment_methods.store', ['method' => App\Models\GatewayType::CREDIT_CARD]) }}"
|
||||
method="post" id="payment_form">
|
||||
method="post" id="server-response">
|
||||
@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="payment_method_id" value="1">
|
||||
|
||||
@ -36,7 +36,7 @@ ctrans('texts.credit_card')])
|
||||
<!-- Your JS includes go here -->
|
||||
<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">
|
||||
|
||||
|
@ -93,17 +93,20 @@ function securePanelCallback(event) {
|
||||
if (!event.fieldValid) {
|
||||
alert(getError(event.errors));
|
||||
} else {
|
||||
var s = document.getElementById("securefieldcode");
|
||||
var s = document.querySelector("input[name=securefieldcode]");
|
||||
s.value = event.secureFieldCode
|
||||
console.log(s.value);
|
||||
}
|
||||
}
|
||||
|
||||
function doneCallback() {
|
||||
var form = document.getElementById("payment_form");
|
||||
console.log("done call bak");
|
||||
var form = document.getElementById("server-response");
|
||||
form.submit();
|
||||
}
|
||||
|
||||
function saveAndSubmit() {
|
||||
console.log("save and sub");
|
||||
eWAY.saveAllFields(doneCallback, 2000);
|
||||
return false;
|
||||
}
|
||||
|
@ -12,6 +12,7 @@
|
||||
<input type="hidden" name="company_gateway_id" value="{{ $gateway->getCompanyGatewayId() }}">
|
||||
<input type="hidden" name="payment_method_id" value="1">
|
||||
<input type="hidden" name="token" id="token" value="">
|
||||
<input type="hidden" name="securefieldcode" value="">
|
||||
</form>
|
||||
|
||||
<div class="alert alert-failure mb-4" hidden id="errors"></div>
|
||||
|
Loading…
Reference in New Issue
Block a user