1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00

Fixed invalid payment if auto-billing with invalid token

This commit is contained in:
Hillel Coren 2016-02-22 12:26:26 +02:00
parent 881dd10e2c
commit 9f2e82323d
2 changed files with 9 additions and 6 deletions

View File

@ -273,10 +273,13 @@ class PaymentService extends BaseService
// submit purchase/get response // submit purchase/get response
$response = $gateway->purchase($details)->send(); $response = $gateway->purchase($details)->send();
$ref = $response->getTransactionReference();
// create payment record if ($response->isSuccessful()) {
$ref = $response->getTransactionReference();
return $this->createPayment($invitation, $accountGateway, $ref); return $this->createPayment($invitation, $accountGateway, $ref);
} else {
return false;
}
} }
public function getDatatable($clientPublicId, $search) public function getDatatable($clientPublicId, $search)

View File

@ -22,7 +22,7 @@
@section('content') @section('content')
<div class="row"> <div class="row">
<div class="col-md-8"> <div class="col-md-7">
<div> <div>
<span style="font-size:28px">{{ $client->getDisplayName() }}</span> <span style="font-size:28px">{{ $client->getDisplayName() }}</span>
@if ($client->trashed()) @if ($client->trashed())
@ -30,7 +30,7 @@
@endif @endif
</div> </div>
</div> </div>
<div class="col-md-4"> <div class="col-md-5">
<div class="pull-right"> <div class="pull-right">
{!! Former::open('clients/bulk')->addClass('mainForm') !!} {!! Former::open('clients/bulk')->addClass('mainForm') !!}
<div style="display:none"> <div style="display:none">