Braintree halts on PayNow

I just found out Braintree credit card payments does not work anymore. Don’t know when or why it happened. I changed nothing on Braintree, and nothing on InvoiceNinja in online payment settings. However I did update Invoice Ninja frequently and had to update PHP from 6 to 7.

I’m using the latest InvoiceNinja self host.

The system will halt on Pay now button.
Brintree

How can I troubleshoot this?

Thank you

Br,
Dali

Paypal via Braintree account works well, but credit card payment does not.

I have enabled debug mode checked the logs.

Laravel:
laravel-error.log – no entries
not-found.log – no entries

Apache log - no entries
PHP log - no entries

I have tried with both, Chrome and Mozilla. I have regenerated Braintree API keys. The same.

When I hit Pay Now button it just halts and does nothing.

Please help. Thank you

Br,
Dali

Are there any errors in the browser console?

Hi Hillel.

Thank you for your prompt reply.

When page loads there are 2 warnings, that I guess are OK.

The SSL certificate used to load resources from https://api.braintreegateway.com will be distrusted in M70. Once distrusted, users will be prevented from loading these resources. See https://g.co/chrome/symantecpkicerts for more information. credit_card:1 The SSL certificate used to load resources from https://client-analytics.braintreegateway.com will be distrusted in M70. Once distrusted, users will be prevented from loading these resources. See https://g.co/chrome/symantecpkicerts for more information. Navigated to https://globevoices.com/payments/public/payment/mfztgsgtpc0nty8mwnnbrq5zzqdep4lp/credit_card

Then I enter my credit card data and press Pay Now there is no activity anymore in any of the log files.

The request is from debug window is:

path_info /payment/mfztgsgtpc0nty8mwnnbrq5zzqdep4lp/credit_card session_attributes array:25 [ "_token" => "YStnYzk8FDPNdzIf8g9Db3UGllHjUM2jLj27oJdp" "login_user_59ba36addc2b2f9401580f014c7f58ea4e30989d" => 10 "sessionCounter" => 13 "news_feed_id" => "2" "timezone" => "Europe/Ljubljana" "dateFormat" => "d.m.Y" "datePickerFormat" => "dd.mm.yyyy" "currency" => 3 "currency_decorator" => "symbol" "sessionLocale" => "en" "datetimeFormat" => "d.m.Y H:i" "start_of_week" => 1 "userAccounts" => array:2 [ 0 => {#1072 +"id": 1 +"user_id": 1 +"public_id": null +"user_name": "Dali Sternisa" +"account_id": 1 +"account_name": "DB STUDIO, Dalibor Sterniša s.p." +"logo_url": "https://globevoices.com/payments/public/logo/XHc1QFVNpjfcolUSTzKOgBcrllVlgny9.png" } 1 => {#1071 +"id": 1 +"user_id": 10 +"public_id": null +"user_name": "Dali Sternisa" +"account_id": 6 +"account_name": "DB STUDIO, Dalibor Sterniša s.p. | GlobeVoices" +"logo_url": "https://globevoices.com/payments/public/logo/zlnioc8ksbhxcooznxjbvowrywcdnxs5.png" } ] "recent_history" => array:1 [ 6 => array:2 [ 0 => {#1064 +"accountId": 6 +"url": "https://globevoices.com/payments/public/invoices/153" +"entityType": "invoice" +"name": "Invoice: 2018-5095_GV" +"timestamp": 1523123859 +"client_id": 1 +"client_name": "Testna Stranka d.o.o." } 1 => {#1074 +"accountId": 6 +"url": "https://globevoices.com/payments/public/invoices/152" +"entityType": "invoice" +"name": "Invoice: 2018-5094_GV" +"timestamp": 1523123719 +"client_id": 1 +"client_name": "Testna Stranka d.o.o." } ] ] "dbServer" => "mysql" "DEBUG_INFO" => "App Version: v4.2.2\nWhite Label: Yes - XHc1QFVNpjfcolUSTzKOgBcrllVlgny9\nServer OS: Windows NT 10.0\nPHP Version: 7.0.27\nMySQL Version: 5.7.11-log" "_previous" => array:1 [ "url" => "https://globevoices.com/payments/public/payment/mfztgsgtpc0nty8mwnnbrq5zzqdep4lp/credit_card" ] "_flash" => array:2 [ "old" => [] "new" => [] ] "showRightSidebar" => false "PHPDEBUGBAR_STACK_DATA" => [] "contact_key" => "lrak44jqyofcy13qoahpr1ydvvexgyq0" "mfztgsgtpc0nty8mwnnbrq5zzqdep4lp" => true "invitation_key" => "mfztgsgtpc0nty8mwnnbrq5zzqdep4lp" "619gateway_type" => 1 "619payment_ref" => "590_5ac906fab8706" ]

Don’t know where to look anymore. Any ideas?

Br,
Dali

However. There are errors in browser console when I break it by press Cancel.

It seems there are some JS calls loaded on HTTP instead is HTTPS. It says This request has been blocked. See bellow.

Navigated to https://globevoices.com/invoice.html?mfztgsgtpc0nty8mwnnbrq5zzqdep4lp
invoice.html?mfztgsgtpc0nty8mwnnbrq5zzqdep4lp:1 Mixed Content: The page at 'https://globevoices.com/invoice.html?mfztgsgtpc0nty8mwnnbrq5zzqdep4lp' was loaded over HTTPS, but requested an insecure script 'http://code.jquery.com/jquery-2.1.4.min.js'. This request has been blocked; the content must be served over HTTPS.
invoice.html?mfztgsgtpc0nty8mwnnbrq5zzqdep4lp:225 Uncaught ReferenceError: $ is not defined
    at invoice.html?mfztgsgtpc0nty8mwnnbrq5zzqdep4lp:225
(anonymous) @ invoice.html?mfztgsgtpc0nty8mwnnbrq5zzqdep4lp:225
mfztgsgtpc0nty8mwnnbrq5zzqdep4lp:1 Failed to start loading 

Br,
Dali

If you’re using the iframe feature try disabling it to see if it helps.

This is without iframe.

I’m not sure, I can’t reproduce the problem. We hope to release our next version tomorrow, maybe it will help?

This link (https://globevoices.com/invoice.html?mfzt…) looks like it’s using the iframe. I’d strongly suggest disabling debug mode if this is a production server.

For testing im calling direct link, bypassing the iframe.

I had also dissabled iframe completely without success.

Br,
Dali

When you click ‘Pay Now’ it should kick off a request to Braintree, I’d suggest using the network tab in the browser console to check the response.

I did cleared the cache (?clear_cache=true) and completely turned off iframe, just to be 100% shure it’s not iframe.

This is what happens after Pay Now Click

response from upper one is
/**/callback_jsonb5c9ef9692b443a5a83ec21e879cbae9({"creditCards":[{"type":"CreditCard","nonce":"f866f6b3-61aa-0fad-8bfc-16e07b155806","description":"ending in 94","consumed":false,"threeDSecureInfo":null,"details":{"lastTwo":"94","lastFour":"4694","cardType":"Visa"},"binData":{"prepaid":"No","healthcare":"No","debit":"No","durbinRegulated":"No","commercial":"No","payroll":"No","issuingBank":"Unicredit Banka Slovenija D.D.","countryOfIssuance":"SVN","productId":"F"}}],"status":202})

response fron second one is
/**/callback_json111a1571ca8f461fa4813a694b8cd81f({status:201})

Does that explain anything?

The Pay Now button stays grayed as waiting for something.

Thank you
Br,
Dali

Do you see a difference in behavior if you click the ‘pay now’ button or you use the enter key to submit the form?

Hey, you are a GENIOUS !!!

Enter works! Successfully applied payment

Thanks, good to know. It’s clearly a bug, we’ll look into it.

Mouse click on a button seems to be a problem. When I applied ENTER after CVV field it worked.

Br,
Dali

Thank you Hillel.

If you have a solution as a simple modification of the code, please drop it here.

Thank you

Also, don’t know if related but i’m getting other Payment options listed, that should not be there.

Visa card on file? I havent seen this before. When click on it it will say Braintree: Insufficient Funds

Br,
Dali

That’s from token billing, it can be disabled on /settings/online_payments

I disabled token billing, but Visa Card on File is still there. I cleared the cache too. Does this applies for new invoices or should work for current ones too?

Thank you

Br,
Dali

Disabling token billing will prevent storing new cards, you can remove existing cards on the client portal dashboard.

Exactly. Thank you so much again!!!

Br,
Dali