1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-19 16:01:34 +02: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
$response = $gateway->purchase($details)->send();
$ref = $response->getTransactionReference();
// create payment record
if ($response->isSuccessful()) {
$ref = $response->getTransactionReference();
return $this->createPayment($invitation, $accountGateway, $ref);
} else {
return false;
}
}
public function getDatatable($clientPublicId, $search)

View File

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