This commit is contained in:
Benjamin Beganović 2021-05-24 13:11:47 +02:00
parent 9393b2305d
commit d66f9f4076

View File

@ -118,7 +118,7 @@ class PayPalExpressPaymentDriver extends BaseDriver
$this->initializeOmnipayGateway(); $this->initializeOmnipayGateway();
$response = $this->omnipay_gateway $response = $this->omnipay_gateway
->completePurchase(['amount' => $this->payment_hash->data->amount]) ->completePurchase(['amount' => $this->payment_hash->data->amount, 'currency' => $this->client->getCurrencyCode()])
->send(); ->send();
if ($response->isCancelled()) { if ($response->isCancelled()) {
@ -187,7 +187,7 @@ class PayPalExpressPaymentDriver extends BaseDriver
'cancelUrl' => $this->client->company->domain() . '/client/invoices', 'cancelUrl' => $this->client->company->domain() . '/client/invoices',
'description' => implode(',', collect($this->payment_hash->data->invoices) 'description' => implode(',', collect($this->payment_hash->data->invoices)
->map(function ($invoice) { ->map(function ($invoice) {
return sprintf('%s: %s', ctrans('texts.invoice_number'), $invoice->invoice_number); return sprintf('%s: %s', ctrans('texts.invoice_number'), $invoice->number);
})->toArray()), })->toArray()),
'transactionId' => $this->payment_hash->hash . '-' . time(), 'transactionId' => $this->payment_hash->hash . '-' . time(),
'ButtonSource' => 'InvoiceNinja_SP', 'ButtonSource' => 'InvoiceNinja_SP',