bug fixes

This commit is contained in:
Hillel Coren 2014-02-02 22:37:37 +02:00
parent 84ae30e60a
commit ea92b116d2
3 changed files with 12 additions and 4 deletions

View File

@ -156,7 +156,7 @@ class PaymentController extends \BaseController
'card' => $card, 'card' => $card,
'currency' => $invoice->client->currency->code, 'currency' => $invoice->client->currency->code,
'returnUrl' => URL::to('complete'), 'returnUrl' => URL::to('complete'),
'cancelUrl' => URL::to('/'), 'cancelUrl' => URL::to('/')
]; ];
} }
@ -205,6 +205,14 @@ class PaymentController extends \BaseController
$accountGateway = $invoice->client->account->account_gateways[0]; $accountGateway = $invoice->client->account->account_gateways[0];
$gateway = self::createGateway($accountGateway); $gateway = self::createGateway($accountGateway);
$client = $invoice->client;
$client->address1 = trim(Input::get('address1'));
$client->address2 = trim(Input::get('address2'));
$client->city = trim(Input::get('city'));
$client->state = trim(Input::get('state'));
$client->postal_code = trim(Input::get('postal_code'));
$client->save();
try try
{ {
$details = self::getPaymentDetails($invoice, Input::all()); $details = self::getPaymentDetails($invoice, Input::all());

View File

@ -16,7 +16,7 @@
@foreach ($accountGateway->fields as $field => $junk) @foreach ($accountGateway->fields as $field => $junk)
@if ($field == 'testMode' || $field == 'developerMode') @if ($field == 'testMode' || $field == 'developerMode')
@if ($config->$field) @if ($config->$field)
{{ Former::populateField($accountGateway->gateway_id.'_'.$field, true ) }} {{-- Former::populateField($accountGateway->gateway_id.'_'.$field, true ) --}}
@endif @endif
@else @else
{{ Former::populateField($accountGateway->gateway_id.'_'.$field, $config->$field) }} {{ Former::populateField($accountGateway->gateway_id.'_'.$field, $config->$field) }}
@ -35,7 +35,7 @@
@if ($field == 'solutionType' || $field == 'landingPage') @if ($field == 'solutionType' || $field == 'landingPage')
{{-- do nothing --}} {{-- do nothing --}}
@elseif ($field == 'testMode' || $field == 'developerMode') @elseif ($field == 'testMode' || $field == 'developerMode')
{{ Former::checkbox($gateway->id.'_'.$field)->label(Utils::toSpaceCase($field))->text('Enable') }} {{-- Former::checkbox($gateway->id.'_'.$field)->label(Utils::toSpaceCase($field))->text('Enable') --}}
@else @else
{{ Former::text($gateway->id.'_'.$field)->label(Utils::toSpaceCase($field)) }} {{ Former::text($gateway->id.'_'.$field)->label(Utils::toSpaceCase($field)) }}
@endif @endif

View File

@ -347,7 +347,7 @@ function generatePDF(invoice, checkMath) {
x += 16; x += 16;
if (checkMath && parseFloat(total) != parseFloat(invoice.amount)) if (checkMath && parseFloat(total).toFixed(4) != parseFloat(invoice.amount).toFixed(4))
{ {
var doc = new jsPDF('p', 'pt'); var doc = new jsPDF('p', 'pt');
doc.setFont('Helvetica',''); doc.setFont('Helvetica','');