PAYPAL return URL

Hi guys,



I just wants to set a Auto Return for Website Payments



Return URL: Enter the URL that will be used to redirect your customers upon payment completion. This URL must meet the guidelines detailed below. Learn More





Can anyone tell me where can i find this URL ?



Thank you

[quote name=‘londonman’]Hi guys,



I just wants to set a Auto Return for Website Payments



Return URL: Enter the URL that will be used to redirect your customers upon payment completion. This URL must meet the guidelines detailed below. Learn More





Can anyone tell me where can i find this URL ?



Thank you[/quote]

You won’t find it anywhere. You can for example use the homepage URL like ‘http://www.yoursite.xx’ or you can create a ‘Thank you’ page and use it as the ‘return URL’, for example ‘http://www.yoursite.xx/thankyou.php’ or whatsever…

Why are you needing a URL for Paypal to return to?



What are the guidelines? They did not seem to appear.

Jim,



If you login to your Paypal account and go to Profile => My Selling Tools => Website preferences and click “update” you can see what the rules are.



This is what it says:


[quote] * Per the user agreement, you must provide verbiage on the page displayed by the Return URL that will help the buyer understand that the payment has been made and that the transaction has been completed.

* You must provide verbiage on the page displayed by the Return URL that explains that payment transaction details will be emailed to the buyer.

* Example: Thank you for your payment. Your transaction has been completed, and a receipt for your purchase has been emailed to you. You may log into your account at Digital Wallets, Money Management, and More | PayPal US | PayPal US to view details of this transaction.

[/quote]



What I did was create a page called:



Thank You For Your Order



With Admin => Content => Pages



In that page I put:


```php

Thank you for your order, we really appreciate your business.


A receipt will be emailed to you shortly. You can also log back into your Paypal account to see the details of your purchase.


We are contantly adding new products to the site so if you need anything in the future please look us up. If we don't have what you need online please feel free to contact us and we'll do our best to get it for you.

```

Then in my Paypal setting area that I stated above I put this as my return URL:

```php http://www.saltwatertogo.com/thank-you-for-your-order.html ```

Hope that helps you guys,

Brandon

I don’t think you need this with cscart, some apps send the return in the script other don’t.

I’m not sure, but I think if you don’t provide the return URL, the customer will stay on the PayPal site without to be redirected to your shop.

If you use PayPal Website Payments Standard account in CS-Cart, after placing the order, the customer will need to click the “Return to merchant” button at PayPal to return to your store.



And you should have the following settings in your PayPal account:

* Instant Payment Notification - off

* Payment Data Transfer - off

* Auto Return for Website Payments - off

* Return URL - blank

[quote name=‘orangegirl’]If you use PayPal Website Payments Standard account in CS-Cart, after placing the order, the customer will need to click the “Return to merchant” button at PayPal to return to your store.



And you should have the following settings in your PayPal account:

* Instant Payment Notification - off

* Payment Data Transfer - off

* Auto Return for Website Payments - off

* Return URL - blank[/QUOTE]



Thanks Kate, I have just changed my settings to this. Hopefully it will work now! They were not set to this before and Paypal was set up to return to one of our generic sites thanking the customer for payment. I never had a problem until we shut down an older site that was still using the “Instant Payment Notification preferences” which would send a reply back to a specific site. I’ve attached an image of what the area on Paypal looked like. Once I shut down the old site that used the Instant Payment Notification preferences it pretty much broke everything to do with Paypal Standard. On all of the CS Cart sites and also on a couple of other sites we would still get payments from customers who paid via Paypal, but it would leave the order as “open” or “failed”. I did see that Paypal had no problems communicating with eBay, they only had a problem communicating with every other site.

ScreenHunter_01 Mar. 20 18.19.jpg

Sorry Kate, it didn’t work. I will try to get a hold of Paypal this week and see if I can figure out what the scoop is.

Dear Jim,



I am sorry to hear this. The mentioned settings are usually recommended to CS-Cart owners and we have not heard about any problems caused by these settings.



Probably, you should better contact us via Help Desk and we will investigate the issue on your site in more detail.

Kate,



Where does the customer get returned to with your settings? Do they get returned to the order confimation page?



I had those settings like you have them before on my site, but they didn’t work. That is why I set up a thank you page and then changed my Paypal settings to reflect that.



It’s been a while since I tested this though.



Thanks,



Brandon

Hello Brandon.



There is the “Return to merchant” link at PayPal after the payment is complete, so the customers need to click on it and then they will be returned to the order details page in CS-Cart store.

Well, I ended up calling Paypal to try to get the issue resolved. Since I was having the same issue on all my sites (including BC), I knew it wasn’t a CS-Cart issue. What the tech support told me was because we did have the IPN that linked to a page on the old .asp website and it no longer responded because we changed shopping carts it returned an “error” to Paypal and after the 16th error Paypal shut off the IPN reply to all websites…including the .asp website. Once I took the old .asp link out I had to go back in and activate the IPN and he had me put in a generic paypal address. This “reset” their server. He then had me turn off the IPN address and now he says when I get a Paypal payment it should work. So now I wait to see how it goes.

So that was the ticket, I had to “reset” the IPN on Paypal to get it to send out the notifications again. Now the sites were properly and post properly when we receive a Paypal payment.

Brandon,



Does your method result in the order status getting set to “processed” in CS-Cart? I figure paypal has communicate back to cs-cart the the order went through ok and just wanted to make sure this happened using the autoreturn URL like you are doing. It would be nice if we could make the auto-return URL dynamic like:



mysite.com/index.php?dispatch=checkout.complete&order_id=XXX



thanks!

Bill


[quote name='brandonvd' timestamp='1300163034' post='106695']

Jim,



If you login to your Paypal account and go to Profile => My Selling Tools => Website preferences and click “update” you can see what the rules are.



This is what it says:







What I did was create a page called:



Thank You For Your Order



With Admin => Content => Pages



In that page I put:


```php

Thank you for your order, we really appreciate your business.


A receipt will be emailed to you shortly. You can also log back into your Paypal account to see the details of your purchase.


We are contantly adding new products to the site so if you need anything in the future please look us up. If we don't have what you need online please feel free to contact us and we'll do our best to get it for you.

```

Then in my Paypal setting area that I stated above I put this as my return URL:

```php http://www.saltwatertogo.com/thank-you-for-your-order.html ```

Hope that helps you guys,

Brandon
[/quote]

It's 'almost' funny that the CSCart knowledge base ( 3.0.6 ) advises that Auto return setting in PayPal be set to OFF…lol

Your PayPal account should have the following settings:[list]

[]Instant Payment Notification - off

[
]Payment Data Transfer - off

[]Auto Return for Website Payments - off

[
]Return URL - blank

[/list]

[url=“CS-Cart Documentation — CS-Cart 4.15.x documentation”]CS-Cart Documentation — CS-Cart 4.15.x documentation

The knowledge base requires a serious update…

Thing is with setting up an Auto return url is how in the heck does

the CS Cart script know that the customer has returned to an html page.

I thought the object was for CS Cart to 'know' and adjust inventory accordingly.

Please this is not PayPal but the new topic I opened has no replies yet.



I am implementing a new Payment Gateway on CS-Cart. Using the instructions in [url=“CS-Cart Documentation — CS-Cart 4.15.x documentation”]CS-Cart Documentation — CS-Cart 4.15.x documentation I have been able to create a payment script and update the MySQL cscart_payment_processors table. The application now connects successfully to the Gateway with the correct order total, merchant ID etc. The problem now is getting the response back. It’s not clear which script should be specified as the Return URL when sending the request to the Gateway (GTPay in this case). I have written the script to handle the response in the same app/payments/ gtpay_payment_script.php file and specified the same file as the return URL but it always comes up with “Access Denied” whenever control is returned from the Gateway. Here’s the script in the gtpay_payment_script.php file (I came up with this script after looking at the other payment scripts in app/payments, CS-Cart has no detailed guide on exactly what this script should do other than “send data to your payment processor server)”):


```php

if (!defined('BOOTSTRAP')) { die('Access denied'); }
//this is supposed to handle the response from the Gateway - still working on this part
if (defined('PAYMENT_NOTIFICATION')) {
if ($mode == 'process') {
$pp_response["order_status"] = (($_REQUEST['gtpay_tranx_status_code'] == "00") ? 'P' : 'F');

if ($_REQUEST['gtpay_tranx_status_code'] == 'Z6') {
$pp_response["order_status"] = 'I';
$pp_response["reason_text"] = "Cancelled";
} elseif ($_REQUEST['gtpay_tranx_status_code'] != '00') {
$pp_response["reason_text"] = "Error";
}
if (isset($_REQUEST['gtpay_tranx_status_msg'])) {
$pp_response["reason_text"].= ": " . $_REQUEST['gtpay_tranx_status_msg'];
}
if (isset($_REQUEST['gtpay_tranx_id'])) {
$pp_response["transaction_id"] = $_REQUEST['gtpay_tranx_id'];
}
$order_id = $_REQUEST['gtpay_echo_data'];
if (fn_check_payment_script('gtpay_payment_script.php', $order_id)) {
fn_finish_payment($order_id, $pp_response, false);
fn_order_placement_routines('route', $order_id);
}
}
} else { //send payment to gateway
//get payment total amount
$amount = $order_info["total"]; //str_replace('.', ',', $order_info["total"]);
// transaction id
$_order_id = $order_id.'_'.mt_rand(11111,99999);
//specify the url
$submit_url = 'GATEWAY URL GOES HERE';
//build parameters
$post_data = array(
'gtpay_cust_id' =>'X',
'gtpay_mert_id' =>'XXX',
'gtpay_tranx_id' => $_order_id, //gtpay tranx id
'gtpay_item_name_1' => 'Numartng: Goods Purchased',
'gtpay_tranx_amt' =>$amount*100, // amount converted to gtpay kobo format
'gtpay_tranx_noti_url' => 'MY-SITE-URL/app/payments/gtpay_payment_script.php', //THIS IS REALLY WHERE THE ISSUE IS, THIS IS WHERE CONTROL SHOULD BE RETURNED TO FROM THE GATEWAY
'gtpay_no_show_cust_id' => 'no',
'gtpay_tranx_memo' => 'Numartng: Goods Purchased',
'gtpay_gway_first' => 'yes',
'gtpay_gway_name' =>'webpay',
'gtpay_echo_data' => $order_id //order id again, included as echo data to be used when control is returned
);

//print_r($post_data); die;
fn_create_payment_form($submit_url, $post_data, 'GTPay Server');
exit;
}
```

Obviously from the code, CS-Cart needs to have defined the constant BOOTSTRAP, which means this script probably shouldn’t be run directly, maybe it’s supposed to be included somewhere else, meaning my Return URL should be different. I’m sure someone must have implemented something similar so please I will appreciate your help on this. Thank you very much!

PS: I'm using Multivendor 4.1.3

Please check our answer