The paypal return url is getting submitted to paypal's payment screen as this:
http%3A//www.domain.com/drupaldir//drupaldir/store/history/1
(so it results in a 'page not found' upon completion of a successful payment on paypal)

I had a similar issue with the path of the ipn url, but this patch (51520#comment-76832) cleared it up.

I guess the return url also needs to be formatted as url(NULL, NULL, NULL, TRUE)? If so, could somebody please show me how to adjust these lines in paypal module?

  $return_url = variable_get('paypal_return_url', '%order-history') == '%order-history' ? t('%order-history', array('%order-history' => url("store/history/$user->uid"))) : url(variable_get('paypal_return_url', '%order-history'));
  $return_url = $base_url .'/'. $return_url;

or submit a patch? (Sorry, I don't dare attempt this. I can't program.)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

neclimdul’s picture

Status: Active » Needs review
FileSize
1.72 KB

Yeah your pretty much right. I should have caught this when I was doing the other fix. Sorry. This patch should fix both the return_url and the cancel_url. It also looks like there might have been a bug if the return URI you where trying to use was a secure https URI, it would treat it as local. Since its probably not common with this module it wasn't noticed but this should fix it anyways.

guckie’s picture

James,

{{{{{{{ big hug! }}}}}}}

Thanks, this patch does indeed square away the return & cancel urls. (and thanks for the ipn url patch too!)

Just a note: I did get this message when patching
Hunk #1 FAILED at 112.
1 out of 1 hunk FAILED

I just hand-pasted the code to change the urls & all was well.

Looks like there may be a couple of lines left in there that were used for debugging?

Thanks again!

neclimdul’s picture

Title: Return URL is screwy in paypal.module » IPN URL Issues in paypal.module
Status: Needs review » Reviewed & tested by the community
FileSize
2.36 KB

Whoops :(
Ok, Well I'm going to go ahead and make a couple changes here.
1) Make this the thread for both the issue in the previous thread(incorrect URL on settings page) and and this issue since the previous thread had several issues.
2) Going to make a clearer title for the problem associated with both issues
3) Give a patch for all the changes against CVS.
4) and based on Gucken's feedback mark this as needing to be committed since the new patch doesn't actually change anything from the other 2 patches, just combines them.

Hope that'll make it clearer for anyone else with the issue and help the patch get to CVS.

neclimdul’s picture

FileSize
3.17 KB

Ok this patch is up to date and adds the sandbox functionality. there are still some bugs but they aren't related to this thread.

neclimdul’s picture

wrong thread... pay no attention to the above patch

neclimdul’s picture

Component: paypal.module » paypal
Status: Reviewed & tested by the community » Fixed

Commited updated and cleaned up version to HEAD and 4.7

Anonymous’s picture

Status: Fixed » Closed (fixed)