Paypal Return URL

  • Posts: 87
  • Thank you received: 10
14 years 2 weeks ago #840

Hi Everybody,

I have a little problem with the returning from paypal. When I come back, it puts me on the homepage and not on the after_end. I´m sure, that out fault. Any ideas?

Thx Nicolas
Gabor
H6

Please Log in or Create an account to join the conversation.

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
14 years 2 weeks ago #842

Hi,

Mmmm. Could you try to replace the function

function after_end(){
		return true;
	}
with the function
function after_end(){
		if(!isset($this->current)){
			JRequest::setVar( 'layout', 'after_end' );
			return $this->display();
		}
		return true;
	}
in the file components/com_hikashop/controllers/checkout.php near line 980 and try again ?
Also, the Return URL option should be empty in the configuration of the paypal plugin.

Please Log in or Create an account to join the conversation.

  • Posts: 87
  • Thank you received: 10
14 years 2 weeks ago #844

nop....that doesn´t work. Can I send you a privat message with the URL of our dev-plattform?
Cheers
Gabor

Please Log in or Create an account to join the conversation.

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
14 years 2 weeks ago #846

Sure. You can send the information at This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
13 years 9 months ago #8507

Sorry to ressurect an old thread, but I am having the same problem.

I have my paypal plugin cancel url and return url set empty. When completing a payment through paypal sandbox, I am redirect to the homepage with the usual paypal parameteurs :
(I removed some pers. information)
dev.myUrl.com/index.php?mc_gross=25.00&i...n_link=XXXXXXXXXXXXX

Unless HikaShop has a Joomla system plugin (which I did not found), there is surely missing something like : option=com_hikashop&view=checkout&layout=after_end

Would I need to add it manually?

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
13 years 8 months ago #8529

I'm still debugging this, and I managed to debug the variable that is sent to paypal :

(
[cmd] => _ext-enter
[redirect_cmd] => _cart
[upload] => 1
[business] => XXXXX
[receiver_email] => XXXX
[invoice] => 22
[currency_code] => CAD
[return] => http://dev.myUrl.com?option=com_hikashop&view=checkout&layout=after_end
[notify_url] => dev.myUrl.com/index.php?option=com_hikas...pl=component&lang=fr
[cancel_return] => dev.myUrl.com/index.php?option=com_hikas...el_order&order_id=22
[undefined_quantity] => 0
[test_ipn] => 1
[no_shipping] => 1
[no_note] => 1
[charset] => utf-8
[address_override] => 1
[first_name] => Super
[last_name] => User
[address1] => xxx
[address2] =>
[zip] => xxx
[city] => xxx
[state] =>
[country] => CA
=> xxx [night_phone_b] => xxx [cpp_header_image] => xxx [item_name_1] => Sunglasses [item_number_1] => Sunglasses [amount_1] => 85 [quantity_1] => 1 [item_name_2] => Livraison [amount_2] => 10 [quantity_2] => 1 ) I can indeed see there is a return value which seems OK, confirmed by this page : https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables Any ideas on this?[email] => xxx
[night_phone_b] => xxx
[cpp_header_image] => xxx
[item_name_1] => Sunglasses
[item_number_1] => Sunglasses
[amount_1] => 85
[quantity_1] => 1
[item_name_2] => Livraison
[amount_2] => 10
[quantity_2] => 1
)

I can indeed see there is a return value which seems OK, confirmed by this page :
cms.paypal.com/us/cgi-bin/?cmd=_render-c...andard_htmlvariables


Any ideas on this?

Please Log in or Create an account to join the conversation.

  • Posts: 87
  • Thank you received: 10
13 years 8 months ago #8531

Hi...

this is easy. The problem is just the length of the return request string. Return it to a redirect_paypal_success.php file.....

an put this in

<?php
header('Location:http://www.yourdomain.com/index.php?option=com_hikashop&ctrl=checkout&task=after_end');
?>

Cheers

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
13 years 8 months ago #8783

gaborgaborgabor écrit:

Hi...

The problem is just the length of the return request string.


Is this documented somewhere in the paypal API? I couldn't locate that informaiton.

I know your solution would work, but this is not really what I'm looking for. This is a quick "fix", but operates outside the "CMS" world.

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
13 years 8 months ago #8827

According to the Paypal doc, the paypal return variable can be up to 1 024 characteurs. Mine is only 78...

Source

Please Log in or Create an account to join the conversation.

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
13 years 8 months ago #8831

It surely isn't a problem of URL length, however there is apparently a problem with some URLs while others work.
There are a lot of forum threads out there talking about problems with the return URL: www.google.com/search?sourceid=chrome&ie...l+not+working+paypal
This one seems to have interesting advices :
www.x.com/message/152486

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
13 years 8 months ago #8841

It now works correctly for me. Here is what I did :

In my seller's sandbox, I enabled Auto Return for Website Payments under Profile -> Website Payment Preferences.

I then entered a non-valid url just so I can make some tests.

Also, simply for security issues, I added the rm value to the paypal variables that are being sent ("rm" => "2" in plugins/hikashoppayment/paypal/paypal.php line 93).

Now, whenever I pay, I'm then automatically redirected to the after_end page. Woot!

The Return URL specified in your PayPal Account is good for all transactions however, you can override this by using the "return" variable in your individual item button code and direct the buyer to a different URL.

from : www.x.com/message/152486#152486

Please Log in or Create an account to join the conversation.

  • Posts: 27
  • Thank you received: 0
12 years 2 months ago #62126

Hi all. Another question in this topic: After returning from Paypal, user gets the message that the transaction was successfull, but that message is in error message style and OI dont like that. Is there a way to style that particular message with css or redirect user to classic after_end message as it is on other payment methods?

Thank you in advance.

Please Log in or Create an account to join the conversation.

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
12 years 2 months ago #62235

That message is displayed by the after_end view file I think. You can edit it via the menu Display->Views.
Otherwise, in most payment methods options screen, and in PayPal's too, there is a "return URL" option so that you can redirect the user wherever you want.

Please Log in or Create an account to join the conversation.

Time to create page: 0.101 seconds
Powered by Kunena Forum