Support » Plugin: WP-Invoice - Web Invoice and Billing » Paypal return url problems

  • I am trying to set up a special thank you page for successful payments however in wpi_paypal-checkout.tpl.php this line of code is a problem:

    <input type="hidden" name="return" value="<?php the_permalink(); ?>" />

    This will redirect the customer back to the original page. If I set up a return url at PayPal web preferences the hidden value above overrides what I put in paypal. Can I put a modified wpi_paypal-checkout.tpl.php in the wpi custom template directory to redirect to my custom thank you page?

Viewing 7 replies - 1 through 7 (of 7 total)
  • It would be nice if the shortcode included a parameter for return_url. Or if in settings we could specify a return url rather than hard coding that it always go back to the permalink for the starting page. Then, if I was selling a book, I could redirect to the page of the book etc. I think it would be best to have coded into the short code parameters so you can have multiple return pages depending on what you are selling. For my purposes, going back to the original button page is a bad idea. That will cause problems. So I need a way to change this return url to something else that will not break the program.

    I see this is also an issue in wpi_paypal-frontend.tpl.php with this line:

    <input type="hidden" name="return" value="<?php echo get_invoice_permalink($invoice['invoice_id']); ?>">

    Plugin Contributor MariaKravchenko


    Thank you for your notes. We will try to check that as soon as possible.

    It does not appear to be something I could do with a template because it looks like you have set up templates to just respond to the view folder.

    Ok, one work around is adding some JS to the page:

    $("document").ready(function() {

    This works but I hope you will consider adding this as a feature of your short code in the future.

    Plugin Contributor Anton Korotkoff



    I agree. This is kind of thing we didn’t think about when developing it several years ago.

    I will fix it ASAP.

    Great, also you may want to add a property for cancel_return as well. I have set up some JS for both and it is working fine.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Paypal return url problems’ is closed to new replies.