Jump to content

Payment complete pages


WHMCS JamesX

Recommended Posts

Updating the settings: Setup -> General Settings -> Ordering -> Auto Redirect on Checkout influences how the customer gets to the payment pages and not what happens after payment.

 

The process is as follows:

 

1. User selects product and picks payment channel (paypal in this case)

2. User is directed to paypal to make payment

3. On payment, user is directed to the viewinvoice.php instead of the usual payment complete page

 

I have a hook that executes on ShoppingCartCheckoutCompletePage which is now being skipped...

Link to comment
Share on other sites

My bad, I'd misread your OP as being to stay on the order completed page (as in, no payment redirection); it's been a long evening.

 

If I recall, the hook point (ShoppingCartCheckoutCompletePage) that you've referenced is executed when "Auto Redirect on Checkout" is set to "Just show the order completed page (no payment redirect)" regardless of invoice status (i.e. Paid, Unpaid). However, with either of the other two options selected, it would only be executed if the invoice doesn't have a status of Unpaid. I seem to remember a couple of other things that could affect it, but that's the short of it though.

 

What are you actually wanting to do with your action hook? Perhaps, there's a better hook point to use for it.

Edited by WHMCS JamesX
Link to comment
Share on other sites

Hmm...

 

It was working last week however I was distracted on Friday and left in the middle of finishing off the hook point code and while updating admin settings.

 

Originally set to: Automatically forward the user to the payment gateway

And payment after the merchant gateway would return to the "order complete page", without a hassle.

 

So now the payment complete page is skipped...

 

Maybe there is a better way to do this.

 

I have an external app, users select a subscription and are directed to WHMCS, they select the payment option and are directed to the vendor to make payment, after payment they are redirected back to the whmcs payment complete page, the hook checks $ispaid and updates the app subscription table and finally redirects the user back to the app with a validated subscription.

 

I have opened a support ticket for this as well... as I am completely out of ideas.

Link to comment
Share on other sites

Weird behaviour:

 

I notice that if I land on this page:

 

http://www.domain.com/viewinvoice.php?id=68&paymentsuccess=true&tx=1JG71505CV8649611&st=Completed&amt=0.02&cc=USD&cm=68&item_number=

 

and I hit refresh

 

It will divert to: http://www.domain.com/cart.php?a=complete

 

This may be due to the hook point I have created which pulls in some of the class files from my app and runs a db connection to the app db...

 

I will test this, and if the db proves to be causing the strain I may have to reconsider how I update the app...

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
Reply to this topic...

×   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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated