Fix Bitcoin amount

This commit is contained in:
Hillel Coren 2017-12-14 13:10:05 +02:00
parent 6960ea19a9
commit e8f118c204
2 changed files with 7 additions and 2 deletions

View File

@ -408,7 +408,7 @@ class StripePaymentDriver extends BasePaymentDriver
'account' => $this->account(),
'invitation' => $this->invitation,
'invoiceNumber' => $invoiceNumber,
'amount' => $amount,
'amount' => $this->invoice()->getRequestedAmount(),
'source' => $response,
]);
} else {

View File

@ -163,7 +163,7 @@
@if ($invoice->isQuote())
{!! Button::normal(trans('texts.download_pdf'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}  
@if ($showApprove)
{!! Button::success(trans('texts.approve'))->asLinkTo(URL::to('/approve/' . $invitation->invitation_key))->large() !!}
{!! Button::success(trans('texts.approve'))->withAttributes(['id' => 'approveButton', 'onclick' => 'onApproveClick()'])->large() !!}
@endif
@elseif ( ! $invoice->canBePaid())
{!! Button::normal(trans('texts.download_pdf'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}
@ -289,6 +289,11 @@
$('#authorizationModal').modal('show');
}
function onApproveClick() {
$('#approveButton').prop('disabled', true);
//location.href = "{{ url('/approve/' . $invitation->invitation_key) }}";
}
function onDownloadClick() {
try {
var doc = generatePDF(invoice, invoice.invoice_design.javascript, true);