Jump to content
  • 0

Pay Now link working, but forcing login


Nahuel

Question

Hello,

I've an issue with the Pay Now link for the sent invoices. 

They're correctly being sent, and if you click the link on the mail, it will open you the invoice and allowing you to choose a payment method. But when you click on "review and confirm" it takes you to the login page.

I've read that this might be caused because of a http / https issue. But I've checked and: 1) the link in the mail is correctly using https and 2) i'm forcing https on the site (even with a hack I found on the forum). Also, I thought that this might be related to some payment method, but trying with an offline one (bank transfer), I still have the same issue.

What could I do to fix this?

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

I just tested this myself and it looks like a bug. We'll have to fix it for v4.6.

In the meantime, you could comment out a few lines of code in one of the files to work around the issue:

In /app/controllers/client_pay.php, toward the top, find:

if (!empty($payment) && isset($payment['client_id']) && $payment['client_id'] != $blesta_client_id) {
    $this->Session->clear('payment');
    $payment = null;
}

add 2 slashes at the beginning of each line, i.e.:

//if (!empty($payment) && isset($payment['client_id']) && $payment['client_id'] != $blesta_client_id) {
//    $this->Session->clear('payment');
//    $payment = null;
//}

Save that, and customers should get to the confirm page now.

Link to comment
Share on other sites

  • 0

When making a payment without being logged in, the system looks for a hash to be included to verify the user. If it is not included, or it is invalid, you will be redirected to log in.

If you aren't already, I would suggest making sure you are running the latest version of Blesta, currently v4.5.2. There was a change in that version that resolved a similar issue that might cause the behavior you experience, but only if you click that pay link while you are currently logged in as an admin.

Link to comment
Share on other sites

  • 0

Hello @Tyson, sorry for the bump. Is there a way for me to get the pay now link on Blesta without sending the invoice? Sometimes I want to give the direct link through WhatsApp or Facebook Messenger, or in a personal mail, and it's just easier for me to do it than sending me the invoice and copying the link.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...