[checkout] URL incorrect when returning from paypal (sandbox)

gallery@linuxce...

Joined: 2006-04-09
Posts: 3
Posted: Sun, 2006-04-09 20:41

Hi,

After doing a simple sandbox purchase on Paypal from Gallery 2.1, I get the following problem where the host part of the URL is missing and therefore the customer doesn't get back to the gallery site and their cart is not emptied.

The URL that is attempted to be accessed after pressing the final 'coninue' button in Paypal:
http://main.php?g2_view=checkoutpaypal.PaymentComplete

My Setup:

Checkout v0.1.14
Checkout by Email v0.0.7
Checkout by Paypal v0.1.9

Gallery version = 2.1 core 1.1.0
PHP version = 5.0.4 apache2handler
Webserver = Apache/2.0.54 (Fedora)
Database = mysqlt 4.1.16, lock.system=flock
Toolkits = ArchiveUpload, Dcraw, NetPBM, Thumbnail, ImageMagick
Acceleration = partial/900, none
Operating system = Linux <removed> 2.6.15-1.1833_FC4 #1 Wed Mar 1 23:41:37 EST 2006 i686
Default theme = matrix
Locale = en_US
Browser = Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.1 (like Gecko)

 
turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Sun, 2006-04-09 21:33

Thanks for telling me about that, I will fix it and release an updated version of the module tomorrow morning. In the meantime you can easily fix the problem with a small edit to the file checkoutpaypal/templates/PaymentButton.tpl, by appending the parameter "forceFullUrl=true" to the g->url statements on lines 4,5 and 6. The amended lines should be as follows:

<input type="hidden" name="return" value="{g->url arg1="view=checkoutpaypal.PaymentComplete" forceFullUrl=true}" />  
<input type="hidden" name="cancel_return" value="{g->url arg1="view=checkoutpaypal.PaymentCancelled" forceFullUrl=true}" />
<input type="hidden" name="notify_url" value="{g->url arg1="controller=checkoutpaypal.IPN" forceFullUrl=true}" />  
 
gallery@linuxce...

Joined: 2006-04-09
Posts: 3
Posted: Sun, 2006-04-09 22:20

Thanks!! - that works just fine now...