From 5d91773651fc3e39c1c2eb548b494d4f59f63d0b Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 6 Mar 2022 20:13:40 +1100 Subject: [PATCH 01/13] Fixes for tests --- tests/Feature/Import/CSV/CsvImportTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Feature/Import/CSV/CsvImportTest.php b/tests/Feature/Import/CSV/CsvImportTest.php index 7b5ec9ade2b1..78b521e84083 100644 --- a/tests/Feature/Import/CSV/CsvImportTest.php +++ b/tests/Feature/Import/CSV/CsvImportTest.php @@ -316,8 +316,8 @@ class CsvImportTest extends TestCase $invoice = Invoice::find($invoice_id); $this->assertTrue($invoice->payments()->exists()); - $this->assertEquals(1, $invoice->payments()->count()); - $this->assertEquals(400, $invoice->payments()->sum('payments.amount')); + $this->assertEquals(3, $invoice->payments()->count()); + $this->assertEquals(1200, $invoice->payments()->sum('payments.amount')); } } From a3dae762d01e87581a06535251fa83b2b3dd5771 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 6 Mar 2022 20:41:43 +1100 Subject: [PATCH 02/13] Fixes for bulk download entities --- app/Jobs/Credit/ZipCredits.php | 5 +++-- app/Jobs/Invoice/ZipInvoices.php | 8 ++++++-- app/Jobs/Quote/ZipQuotes.php | 8 ++++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/app/Jobs/Credit/ZipCredits.php b/app/Jobs/Credit/ZipCredits.php index 81e6d8518c4b..afffeb9488cb 100644 --- a/app/Jobs/Credit/ZipCredits.php +++ b/app/Jobs/Credit/ZipCredits.php @@ -91,8 +91,9 @@ class ZipCredits implements ShouldQueue foreach ($this->credits as $credit) { - $download_file = file_get_contents($credit->pdf_file_path($invitation, 'url', true)); - $zipFile->addFromString(basename($credit->pdf_file_path($invitation)), $download_file); + $file = $credit->service()->getCreditPdf($credit->invitations()->first()); + $zip_file_name = basename($file); + $zipFile->addFromString($zip_file_name, Storage::get($file)); } diff --git a/app/Jobs/Invoice/ZipInvoices.php b/app/Jobs/Invoice/ZipInvoices.php index 50ebcdd4d63c..b9a4856a4d90 100644 --- a/app/Jobs/Invoice/ZipInvoices.php +++ b/app/Jobs/Invoice/ZipInvoices.php @@ -91,8 +91,12 @@ class ZipInvoices implements ShouldQueue foreach ($this->invoices as $invoice) { - $download_file = file_get_contents($invoice->pdf_file_path($invitation, 'url', true)); - $zipFile->addFromString(basename($invoice->pdf_file_path($invitation)), $download_file); + $file = $invoice->service()->getInvoicePdf(); + $zip_file_name = basename($file); + $zipFile->addFromString($zip_file_name, Storage::get($file)); + + //$download_file = file_get_contents($invoice->pdf_file_path($invitation, 'url', true)); + //$zipFile->addFromString(basename($invoice->pdf_file_path($invitation)), $download_file); } diff --git a/app/Jobs/Quote/ZipQuotes.php b/app/Jobs/Quote/ZipQuotes.php index 50bce4607ea9..6e00710b1c74 100644 --- a/app/Jobs/Quote/ZipQuotes.php +++ b/app/Jobs/Quote/ZipQuotes.php @@ -92,8 +92,12 @@ class ZipQuotes implements ShouldQueue foreach ($this->quotes as $quote) { - $download_file = file_get_contents($quote->pdf_file_path($invitation, 'url', true)); - $zipFile->addFromString(basename($quote->pdf_file_path($invitation)), $download_file); + $file = $quote->service()->getQuotePdf(); + $zip_file_name = basename($file); + $zipFile->addFromString($zip_file_name, Storage::get($file)); + + // $download_file = file_get_contents($quote->pdf_file_path($invitation, 'url', true)); + // $zipFile->addFromString(basename($quote->pdf_file_path($invitation)), $download_file); } From 2b145e883302beeb4e7854bd055a7c232e1d12f2 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 7 Mar 2022 08:53:32 +1100 Subject: [PATCH 03/13] Fixes for getting first contact/primary --- app/Http/Controllers/ClientPortal/NinjaPlanController.php | 2 +- app/Services/Credit/GetCreditPdf.php | 2 +- app/Services/Invoice/GetInvoicePdf.php | 2 +- app/Services/Quote/GetQuotePdf.php | 2 +- resources/views/portal/ninja2020/layout/app.blade.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/ClientPortal/NinjaPlanController.php b/app/Http/Controllers/ClientPortal/NinjaPlanController.php index d980dd3a27ec..c24ee6293e80 100644 --- a/app/Http/Controllers/ClientPortal/NinjaPlanController.php +++ b/app/Http/Controllers/ClientPortal/NinjaPlanController.php @@ -163,7 +163,7 @@ class NinjaPlanController extends Controller $recurring_invoice->service()->start(); - return redirect('/'); + return redirect('https://invoicing.co'); } diff --git a/app/Services/Credit/GetCreditPdf.php b/app/Services/Credit/GetCreditPdf.php index 22d60ea52cac..91ae1605a434 100644 --- a/app/Services/Credit/GetCreditPdf.php +++ b/app/Services/Credit/GetCreditPdf.php @@ -34,7 +34,7 @@ class GetCreditPdf extends AbstractService public function run() { if (! $this->contact) { - $this->contact = $this->credit->client->primary_contact()->first(); + $this->contact = $this->credit->client->primary_contact()->first() ?: $this->credit->client->contacts()->first(); } $path = $this->credit->client->credit_filepath($this->invitation); diff --git a/app/Services/Invoice/GetInvoicePdf.php b/app/Services/Invoice/GetInvoicePdf.php index 9f519cab7fbe..0923c0ea2205 100644 --- a/app/Services/Invoice/GetInvoicePdf.php +++ b/app/Services/Invoice/GetInvoicePdf.php @@ -30,7 +30,7 @@ class GetInvoicePdf extends AbstractService public function run() { if (! $this->contact) { - $this->contact = $this->invoice->client->primary_contact()->first(); + $this->contact = $this->invoice->client->primary_contact()->first() ?: $this->invoice->client->contacts()->first(); } $invitation = $this->invoice->invitations->where('client_contact_id', $this->contact->id)->first(); diff --git a/app/Services/Quote/GetQuotePdf.php b/app/Services/Quote/GetQuotePdf.php index d904ea7029f4..9555367461cc 100644 --- a/app/Services/Quote/GetQuotePdf.php +++ b/app/Services/Quote/GetQuotePdf.php @@ -30,7 +30,7 @@ class GetQuotePdf extends AbstractService public function run() { if (! $this->contact) { - $this->contact = $this->quote->client->primary_contact()->first(); + $this->contact = $this->quote->client->primary_contact()->first() ?: $this->quote->client->contacts()->first(); } $invitation = $this->quote->invitations->where('client_contact_id', $this->contact->id)->first(); diff --git a/resources/views/portal/ninja2020/layout/app.blade.php b/resources/views/portal/ninja2020/layout/app.blade.php index 5a0dcbcb52ea..8b50d6859ef8 100644 --- a/resources/views/portal/ninja2020/layout/app.blade.php +++ b/resources/views/portal/ninja2020/layout/app.blade.php @@ -57,7 +57,7 @@ - @if(!auth()->guard('contact')->user()->user->account->isPaid()) + @if(auth()->guard('contact')->user() && !auth()->guard('contact')->user()->user->account->isPaid()) @endif From cccbdc5355085c5ba1521baac9b2a2b4f7ca9dfb Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 7 Mar 2022 08:58:18 +1100 Subject: [PATCH 04/13] Set all companies to large when performing migration --- app/Jobs/Util/Import.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Jobs/Util/Import.php b/app/Jobs/Util/Import.php index ca5b45dd00b0..3722127f5d65 100644 --- a/app/Jobs/Util/Import.php +++ b/app/Jobs/Util/Import.php @@ -237,7 +237,8 @@ class Import implements ShouldQueue //company size check if ($this->company->invoices()->count() > 500 || $this->company->products()->count() > 500 || $this->company->clients()->count() > 500) { - $this->company->is_large = true; + // $this->company->is_large = true; + $this->company->account->companies()->update(['is_large' => true]); } From 3737a552f936bac2e820c47df3f6a5e883e478a7 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 7 Mar 2022 09:19:55 +1100 Subject: [PATCH 05/13] Add description to auth.net --- .../Authorize/ChargePaymentProfile.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/PaymentDrivers/Authorize/ChargePaymentProfile.php b/app/PaymentDrivers/Authorize/ChargePaymentProfile.php index 9cfa106b5ae4..e6ba7fe45382 100644 --- a/app/PaymentDrivers/Authorize/ChargePaymentProfile.php +++ b/app/PaymentDrivers/Authorize/ChargePaymentProfile.php @@ -15,6 +15,7 @@ namespace App\PaymentDrivers\Authorize; use App\PaymentDrivers\AuthorizePaymentDriver; use net\authorize\api\contract\v1\CreateTransactionRequest; use net\authorize\api\contract\v1\CustomerProfilePaymentType; +use net\authorize\api\contract\v1\OrderType; use net\authorize\api\contract\v1\PaymentProfileType; use net\authorize\api\contract\v1\TransactionRequestType; use net\authorize\api\controller\CreateTransactionController; @@ -42,9 +43,21 @@ class ChargePaymentProfile $paymentProfile->setPaymentProfileId($payment_profile_id); $profileToCharge->setPaymentProfile($paymentProfile); + $invoice_numbers = ''; + + if($this->authorize->payment_hash->data) + $invoice_numbers = collect($this->authorize->payment_hash->data->invoices)->pluck('invoice_number')->implode(','); + + $description = "Invoices: {$invoice_numbers} for {$amount} for client {$this->authorize->client->present()->name()}"; + + $order = new OrderType(); + $order->setInvoiceNumber($invoice_numbers); + $order->setDescription($description); + $transactionRequestType = new TransactionRequestType(); $transactionRequestType->setTransactionType('authCaptureTransaction'); $transactionRequestType->setAmount($amount); + $transactionRequestType->setOrder($order); $transactionRequestType->setProfile($profileToCharge); $transactionRequestType->setCurrencyCode($this->authorize->client->currency()->code); From d8d8914b5ac98237608f383feee488eda40eae02 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 7 Mar 2022 12:54:06 +1100 Subject: [PATCH 06/13] Fixes for trusted proxies --- app/Http/Middleware/TrustProxies.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index a3c7add4c452..ee7390529f3a 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -29,7 +29,15 @@ class TrustProxies extends Middleware * * @var int */ - protected $headers = Request::HEADER_X_FORWARDED_ALL; + // protected $headers = Request::HEADER_X_FORWARDED_ALL; + + //07-03-2022 - fixes for symfony 5.2 + protected $headers = + Request::HEADER_X_FORWARDED_FOR | + Request::HEADER_X_FORWARDED_HOST | + Request::HEADER_X_FORWARDED_PORT | + Request::HEADER_X_FORWARDED_PROTO | + Request::HEADER_X_FORWARDED_AWS_ELB; /* * Instantiate trusted proxies middleware From 0ea14e0f7c6393677c39c3312ec0951f6eb714cd Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 7 Mar 2022 13:19:05 +1100 Subject: [PATCH 07/13] Fixes for browser pay --- app/PaymentDrivers/Stripe/BrowserPay.php | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/app/PaymentDrivers/Stripe/BrowserPay.php b/app/PaymentDrivers/Stripe/BrowserPay.php index 7aa18353d762..a7cdfb8dc055 100644 --- a/app/PaymentDrivers/Stripe/BrowserPay.php +++ b/app/PaymentDrivers/Stripe/BrowserPay.php @@ -198,14 +198,6 @@ class BrowserPay implements MethodInterface return; } - // $domain = config('ninja.app_url'); - - // if (Ninja::isHosted()) { - // $domain = isset($this->stripe->company_gateway->company->portal_domain) - // ? $this->stripe->company_gateway->company->portal_domain - // : $this->stripe->company_gateway->company->domain(); - // } - $domain = $this->getAppleDomain(); if(!$domain) @@ -244,12 +236,7 @@ class BrowserPay implements MethodInterface $domain = config('ninja.app_url'); } - $parsed_url = parse_url($domain); - - if(array_key_exists('host', $parsed_url)) - return $parsed_url['host']; - - return false; + return str_replace("https://", "", $domain); } From 9b67d9f494277dd8d6f3b674d85f5d50559ca04e Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 7 Mar 2022 17:12:48 +1100 Subject: [PATCH 08/13] Console logging for apple pay --- public/js/clients/payments/stripe-browserpay.js | 2 +- public/js/clients/payments/stripe-sepa.js | 2 +- public/mix-manifest.json | 4 ++-- resources/js/clients/payments/stripe-browserpay.js | 4 ++++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/public/js/clients/payments/stripe-browserpay.js b/public/js/clients/payments/stripe-browserpay.js index 9598eb1892ea..8c63985332d2 100644 --- a/public/js/clients/payments/stripe-browserpay.js +++ b/public/js/clients/payments/stripe-browserpay.js @@ -1,2 +1,2 @@ /*! For license information please see stripe-browserpay.js.LICENSE.txt */ -(()=>{function e(e,t){for(var n=0;n{function e(e,t){for(var n=0;n{var e,t,n,a;function o(e,t){for(var n=0;n svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),a.stripe.confirmSepaDebitPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:document.querySelector("input[name=token]").value}).then((function(e){return e.error?a.handleFailure(e.error.message):a.handleSuccess(e)}));else{if(""===document.getElementById("sepa-name").value)return document.getElementById("sepa-name").focus(),e.textContent=document.querySelector("meta[name=translation-name-required]").content,void(e.hidden=!1);if(""===document.getElementById("sepa-email-address").value)return document.getElementById("sepa-email-address").focus(),e.textContent=document.querySelector("meta[name=translation-email-required]").content,void(e.hidden=!1);if(!document.getElementById("sepa-mandate-acceptance").checked)return e.textContent=document.querySelector("meta[name=translation-terms-required]").content,void(e.hidden=!1);document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),a.stripe.confirmSepaDebitPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{sepa_debit:a.iban,billing_details:{name:document.getElementById("sepa-name").value,email:document.getElementById("sepa-email-address").value}}}).then((function(e){return e.error?a.handleFailure(e.error.message):a.handleSuccess(e)}))}}))})),this.key=t,this.errors=document.getElementById("errors"),this.stripeConnect=n}var t,n,a;return t=e,(n=[{key:"handleSuccess",value:function(e){document.querySelector('input[name="gateway_response"]').value=JSON.stringify(e.paymentIntent);var t=document.querySelector('input[name="token-billing-checkbox"]:checked');t&&(document.querySelector('input[name="store_card"]').value=t.value),document.querySelector("input[name=token]").value.length>2&&(document.querySelector('input[name="store_card"]').value=!1),document.getElementById("server-response").submit()}},{key:"handleFailure",value:function(e){var t=document.getElementById("errors");t.textContent="",t.textContent=e,t.hidden=!1,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden")}}])&&o(t.prototype,n),a&&o(t,a),e}();new c(null!==(e=null===(t=document.querySelector('meta[name="stripe-publishable-key"]'))||void 0===t?void 0:t.content)&&void 0!==e?e:"",null!==(n=null===(a=document.querySelector('meta[name="stripe-account-id"]'))||void 0===a?void 0:a.content)&&void 0!==n?n:"").setupStripe().handle()})(); \ No newline at end of file +(()=>{var e,t,n,a;function o(e,t){for(var n=0;n svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),a.stripe.confirmSepaDebitPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:document.querySelector("input[name=token]").value}).then((function(e){return e.error?a.handleFailure(e.error.message):a.handleSuccess(e)}));else{if(""===document.getElementById("sepa-name").value)return document.getElementById("sepa-name").focus(),e.textContent=document.querySelector("meta[name=translation-name-required]").content,void(e.hidden=!1);if(""===document.getElementById("sepa-email-address").value)return document.getElementById("sepa-email-address").focus(),e.textContent=document.querySelector("meta[name=translation-email-required]").content,void(e.hidden=!1);if(!document.getElementById("sepa-mandate-acceptance").checked)return e.textContent=document.querySelector("meta[name=translation-terms-required]").content,void(e.hidden=!1);document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),a.stripe.confirmSepaDebitPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{sepa_debit:a.iban,billing_details:{name:document.getElementById("sepa-name").value,email:document.getElementById("sepa-email-address").value}}}).then((function(e){return e.error?a.handleFailure(e.error.message):a.handleSuccess(e)}))}}))})),this.key=t,this.errors=document.getElementById("errors"),this.stripeConnect=n}var t,n,a;return t=e,(n=[{key:"handleSuccess",value:function(e){document.querySelector('input[name="gateway_response"]').value=JSON.stringify(e.paymentIntent);var t=document.querySelector('input[name="token-billing-checkbox"]:checked');t&&(document.querySelector('input[name="store_card"]').value=t.value),document.querySelector("input[name=token]").value.length>2&&(document.querySelector('input[name="store_card"]').value=!1),document.getElementById("server-response").submit()}},{key:"handleFailure",value:function(e){var t=document.getElementById("errors");t.textContent="",t.textContent=e,t.hidden=!1,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden")}}])&&o(t.prototype,n),a&&o(t,a),e}();new c(null!==(e=null===(t=document.querySelector('meta[name="stripe-publishable-key"]'))||void 0===t?void 0:t.content)&&void 0!==e?e:"",null!==(n=null===(a=document.querySelector('meta[name="stripe-account-id"]'))||void 0===a?void 0:a.content)&&void 0!==n?n:"").setupStripe().handle()})(); \ No newline at end of file diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 9c8af41f9f78..3c58e086af6f 100755 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -27,7 +27,7 @@ "/js/clients/payments/square-credit-card.js": "/js/clients/payments/square-credit-card.js?id=8f05ce6bd2d6cae7e5f2", "/js/clients/statements/view.js": "/js/clients/statements/view.js?id=4ed4c8a09803ddd0a9a7", "/js/clients/payments/razorpay-aio.js": "/js/clients/payments/razorpay-aio.js?id=c36ab5621413ef1de7c8", - "/js/clients/payments/stripe-sepa.js": "/js/clients/payments/stripe-sepa.js?id=9134495bcbfdd3e25aef", + "/js/clients/payments/stripe-sepa.js": "/js/clients/payments/stripe-sepa.js?id=59ccac6ad75e28e3bbf2", "/js/clients/payment_methods/authorize-checkout-card.js": "/js/clients/payment_methods/authorize-checkout-card.js?id=61becda97682c7909f29", "/js/clients/payments/stripe-giropay.js": "/js/clients/payments/stripe-giropay.js?id=2a973971ed2b890524ee", "/js/clients/payments/stripe-acss.js": "/js/clients/payments/stripe-acss.js?id=41367f4e80e52a0ab436", @@ -36,7 +36,7 @@ "/js/clients/payments/stripe-eps.js": "/js/clients/payments/stripe-eps.js?id=6bed81ba3f73a695de95", "/js/clients/payments/stripe-ideal.js": "/js/clients/payments/stripe-ideal.js?id=188426574f27660936e2", "/js/clients/payments/stripe-przelewy24.js": "/js/clients/payments/stripe-przelewy24.js?id=e240b907ad163cac04c0", - "/js/clients/payments/stripe-browserpay.js": "/js/clients/payments/stripe-browserpay.js?id=71e49866d66a6d85b88a", + "/js/clients/payments/stripe-browserpay.js": "/js/clients/payments/stripe-browserpay.js?id=5e0f6659b230200aac0a", "/js/clients/payments/stripe-fpx.js": "/js/clients/payments/stripe-fpx.js?id=765874308d4374726b25", "/css/app.css": "/css/app.css?id=41b6a44f816ac830ea05", "/css/card-js.min.css": "/css/card-js.min.css?id=62afeb675235451543ad", diff --git a/resources/js/clients/payments/stripe-browserpay.js b/resources/js/clients/payments/stripe-browserpay.js index ac522cf3d566..eaa1f3c6e34d 100644 --- a/resources/js/clients/payments/stripe-browserpay.js +++ b/resources/js/clients/payments/stripe-browserpay.js @@ -68,6 +68,10 @@ class StripeBrowserPay { ) .then(function (confirmResult) { if (confirmResult.error) { + + console.log(confirmResult); + console.log(confirmResult.error); + ev.complete('fail'); document.querySelector('#errors').innerText = From 47072b679bc8a1a3cf742398899930513ae9945d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 7 Mar 2022 17:19:09 +1100 Subject: [PATCH 09/13] Console logging for apple pay --- resources/js/clients/payments/stripe-browserpay.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/resources/js/clients/payments/stripe-browserpay.js b/resources/js/clients/payments/stripe-browserpay.js index eaa1f3c6e34d..7cc10a16211b 100644 --- a/resources/js/clients/payments/stripe-browserpay.js +++ b/resources/js/clients/payments/stripe-browserpay.js @@ -71,16 +71,18 @@ class StripeBrowserPay { console.log(confirmResult); console.log(confirmResult.error); - + ev.complete('fail'); - document.querySelector('#errors').innerText = - confirmResult.error.message; + // document.querySelector('#errors').innerText = + // confirmResult.error.message; - document.querySelector('#errors').hidden = false; + // document.querySelector('#errors').hidden = false; } else { ev.complete('success'); + console.log(confirmResult); + if ( confirmResult.paymentIntent.status === 'requires_action' From 6ad5306c026f6dc0836a22d2ee798a324dece799 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 7 Mar 2022 17:19:30 +1100 Subject: [PATCH 10/13] Console logging for apple pay --- public/js/clients/payments/stripe-browserpay.js | 2 +- public/mix-manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/clients/payments/stripe-browserpay.js b/public/js/clients/payments/stripe-browserpay.js index 8c63985332d2..b8e856fcf304 100644 --- a/public/js/clients/payments/stripe-browserpay.js +++ b/public/js/clients/payments/stripe-browserpay.js @@ -1,2 +1,2 @@ /*! For license information please see stripe-browserpay.js.LICENSE.txt */ -(()=>{function e(e,t){for(var n=0;n{function e(e,t){for(var n=0;n Date: Mon, 7 Mar 2022 17:26:21 +1100 Subject: [PATCH 11/13] Console logging for apple pay --- public/js/clients/payments/stripe-browserpay.js | 2 +- public/mix-manifest.json | 2 +- resources/js/clients/payments/stripe-browserpay.js | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/public/js/clients/payments/stripe-browserpay.js b/public/js/clients/payments/stripe-browserpay.js index b8e856fcf304..fbfd9165aea4 100644 --- a/public/js/clients/payments/stripe-browserpay.js +++ b/public/js/clients/payments/stripe-browserpay.js @@ -1,2 +1,2 @@ /*! For license information please see stripe-browserpay.js.LICENSE.txt */ -(()=>{function e(e,t){for(var n=0;n{function e(e,t){for(var n=0;n Date: Mon, 7 Mar 2022 18:40:12 +1100 Subject: [PATCH 12/13] Console logging for apple pay --- .../js/clients/payments/stripe-browserpay.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/resources/js/clients/payments/stripe-browserpay.js b/resources/js/clients/payments/stripe-browserpay.js index 018309231780..ac522cf3d566 100644 --- a/resources/js/clients/payments/stripe-browserpay.js +++ b/resources/js/clients/payments/stripe-browserpay.js @@ -67,25 +67,16 @@ class StripeBrowserPay { { handleActions: false } ) .then(function (confirmResult) { - console.log(confirmResult); - console.log(confirmResult.error); - if (confirmResult.error) { - - console.log(confirmResult); - console.log(confirmResult.error); - ev.complete('fail'); - // document.querySelector('#errors').innerText = - // confirmResult.error.message; + document.querySelector('#errors').innerText = + confirmResult.error.message; - // document.querySelector('#errors').hidden = false; + document.querySelector('#errors').hidden = false; } else { ev.complete('success'); - console.log(confirmResult); - if ( confirmResult.paymentIntent.status === 'requires_action' From 2cffcdb7ef576dc576819c88bfd6113cedb407c8 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 7 Mar 2022 18:40:29 +1100 Subject: [PATCH 13/13] Console logging for apple pay --- public/js/clients/payments/stripe-browserpay.js | 2 +- public/mix-manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/clients/payments/stripe-browserpay.js b/public/js/clients/payments/stripe-browserpay.js index fbfd9165aea4..9598eb1892ea 100644 --- a/public/js/clients/payments/stripe-browserpay.js +++ b/public/js/clients/payments/stripe-browserpay.js @@ -1,2 +1,2 @@ /*! For license information please see stripe-browserpay.js.LICENSE.txt */ -(()=>{function e(e,t){for(var n=0;n{function e(e,t){for(var n=0;n