Jump to content

PayPal redirect error- order failed DL items in pending status


Guest dilinger

Recommended Posts

Guest dilinger

I have cc 3.0.7pl1

I am having the same problem as markscarts post# 45

http://www.cubecart.com/site/forums/index....indpost&p=56287

I have the cart installed and working fine with the postal order gateway.

When I use the paypal standard/IPN gateway for automation I run into problems. I have read the thread few times about the confirm and the transfer files.

I followed every step as advised

I made sure the primary PP email matches the gateway email

I checked the URL’s for the IPN and the PDT

No protected directories are active

I noticed a few users followed the steps and they are still having the same problem.

Problem: I can make a live purchase via PayPal and when I am returned to the confirm.php I get sorry your order failed.

When I check orders I see my download as pending not processing.

The download link is never sent

My question: Is the focus not large enough?

If all the steps are followed what could the problem be?

Should the smtp information in admin general settings be populated? (mine is not)

Is there some general step that was overlooked that developers take for granted and non-programmers such as myself are not aware of?

I greatly appreciate any assistance

Link to comment
Share on other sites

Guest groovejuice

Definitely ensure that the smpt info is populated in admin. You may have to try user+yourdomain.com

rather than [email protected]. I have authentication set in the default 'off' selection. I also kept receiving the unsuccessful transaction message until the smpt settings were correct, then all worked like a charm. :)

Link to comment
Share on other sites

Guest dilinger

Definitely ensure that the smpt info is populated in admin. You may have to try user+yourdomain.com

rather than [email protected]. I have authentication set in the default 'off' selection. I also kept receiving the unsuccessful transaction message until the smpt settings were correct, then all worked like a charm. :)

I filled out the smpt info using the host information from my provider and email worked great manually but not automatic via paypal. I also tried the user+domain.com and I got the same error.

Thanks for the reply...

Link to comment
Share on other sites

Guest dilinger

Have you got the ipn all set up with paypal correctly?

thanks for the post evilhomer

Yes I have.

At Paypal, under "Website Payment Preferences":

- Auto Return = on

- URL = http://www.sitename.com/store/confirmed.php

- Payment Data Transfer = on

- Block non-encrypted website payments = off

- PayPal Account Optional = on

- Contact telephone number = off

At Paypal, under "Instant Payment Notification":

- IPN = on

- URL = http://www.sitename.com/store/modules/gateway/PayPal/ipn.php

In my CC ACP, under "PayPal Standard & IPN":

- Status = enabled

- email= (same as PP primary email and same as general settings email)

- Method = IPN

- Default = yes

- Test Mode? = No

I have the email set up as SMTP now

-Method = SMTP

-SMTP Host: not set as default= ( Host has a specific relay server)

-SMTP Port: Not set as default= (Host uses a specific port- not port 25)

-Use Authentication= (required by Host)

-SMTP Username: Username

-SMTP Password: Password

Prior to the post by groovejuice I left all the SMTP information as mail() with default values. I am still having the same problem as I did before I entered the SMTP information.

I have also tried go77306 suggestion from post

http://www.cubecart.com/site/forums/index....indpost&p=74750

I thought maybe go77306 suggestion would work for me but I still have the same issue and I never received a log… strange

If I continue at this rate all those $ 0.01 I am wasting could have paid for my Lic. Key ;)

Maybe it has something to do with my Host

Does anyone have a list of compatible Hosting companies?

Link to comment
Share on other sites

Guest dilinger

I use a company called hosting-unlimited.net they never let me down yet.

Evilhomer

I was totally frustrated with CC so I decided to use another php based cart that I will not name here

The cart I used is not a better product than CC but it is designed for digital downloads and worked with PP IPN. I wanted to try the new cart to find out for sure if it was the host or if it was CC. Knowing that the automation is possible I went back to CC because I am not ready to give up on CC just yet. I found that I did finally get a log file from go77306 fix but I don’t entirely understand the output. The output is legible but I don’t know enough about the routines to make out what it is trying to tell me.

Is this a problem with the IPN looking in the wrong place?

Is the host server restricting access?

Any ideas?

[2006/Jan/22, 15:16:20]

[2006/Jan/22, 15:16:20] Using PDT to check order status for tx:XXXX

[2006/Jan/22, 15:16:20] Payment Failed, Paypal response follows:

[2006/Jan/22, 15:16:20] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

<TITLE>ERROR: The requested URL could not be retrieved</TITLE>

<STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE>

</HEAD><BODY>

<H1>ERROR</H1>

<H2>The requested URL could not be retrieved</H2>

<HR noshade size="1px">

<P>

While trying to retrieve the URL:

<A HREF="http://IP address /cgi-bin/webscr">http://IP address /cgi-bin/webscr</A>

<P>

The following error was encountered:

<UL>

<LI>

<STRONG>

Connection Failed

</STRONG>

</UL>

<P>

The system returned:

<PRE><I> (111) Connection refused</I></PRE>

<P>

The remote host or network may be down. Please try the request again.

<P>Your cache administrator is <A HREF="mailto:webmaster">webmaster</A>.

<BR clear="all">

<HR noshade size="1px">

<ADDRESS>

Generated Sun, 22 Jan 2006 22:16:20 GMT by (host server)

</ADDRESS>

</BODY></HTML>

Link to comment
Share on other sites

Guest dilinger

If this is the address you are pointing paypal ipn to then yes

<A HREF="http://IP address /cgi-bin/webscr">http://IP address /cgi-bin/webscr</A>

paypal ipn is located in

http://www.yourstore.com/modules/gateways/paypal/paypal.ipn

and thats wot u should have in ur paypal account

I have my IPN set correctly with PP

http://www.sitename.com/store/modules/gateway/PayPal/ipn.php

I am not sure why PP is looking at

<A HREF="http://IP address /cgi-bin/webscr">http://IP address /cgi-bin/webscr</A>

I opened a ticket with PP so I should have feedback within 2-3 business days

Thanks

Link to comment
Share on other sites

Guest go77306

can you paste your checkPDT() method here?

(remove your token or sensitive information first)

If this is the address you are pointing paypal ipn to then yes

<A HREF="http://IP address /cgi-bin/webscr">http://IP address /cgi-bin/webscr</A>

paypal ipn is located in

http://www.yourstore.com/modules/gateways/paypal/paypal.ipn

and thats wot u should have in ur paypal account

I have my IPN set correctly with PP

http://www.sitename.com/store/modules/gateway/PayPal/ipn.php

I am not sure why PP is looking at

<A HREF="http://IP address /cgi-bin/webscr">http://IP address /cgi-bin/webscr</A>

I opened a ticket with PP so I should have feedback within 2-3 business days

Thanks

Also, after you made the payment via paypal, ingore about the "your order failed" error, logon to admin page, check the transaction status. It should be "processing". If not, your IPN is not working. It may take as long as a few minutes to get to "processing" status. So, wait a while and check

can you paste your checkPDT() method here?

(remove your token or sensitive information first)

If this is the address you are pointing paypal ipn to then yes

<A HREF="http://IP address /cgi-bin/webscr">http://IP address /cgi-bin/webscr</A>

paypal ipn is located in

http://www.yourstore.com/modules/gateways/paypal/paypal.ipn

and thats wot u should have in ur paypal account

I have my IPN set correctly with PP

http://www.sitename.com/store/modules/gateway/PayPal/ipn.php

I am not sure why PP is looking at

<A HREF="http://IP address /cgi-bin/webscr">http://IP address /cgi-bin/webscr</A>

I opened a ticket with PP so I should have feedback within 2-3 business days

Thanks

Link to comment
Share on other sites

Guest dilinger

can you paste your checkPDT() method here?

(remove your token or sensitive information first)

If this is the address you are pointing paypal ipn to then yes

<A HREF="http://IP address /cgi-bin/webscr">http://IP address /cgi-bin/webscr</A>

paypal ipn is located in

http://www.yourstore.com/modules/gateways/paypal/paypal.ipn

and thats wot u should have in ur paypal account

I have my IPN set correctly with PP

http://www.sitename.com/store/modules/gateway/PayPal/ipn.php

I am not sure why PP is looking at

<A HREF="http://IP address /cgi-bin/webscr">http://IP address /cgi-bin/webscr</A>

I opened a ticket with PP so I should have feedback within 2-3 business days

Thanks

Also, after you made the payment via paypal, ingore about the "your order failed" error, logon to admin page, check the transaction status. It should be "processing". If not, your IPN is not working. It may take as long as a few minutes to get to "processing" status. So, wait a while and check

can you paste your checkPDT() method here?

(remove your token or sensitive information first)

If this is the address you are pointing paypal ipn to then yes

<A HREF="http://IP address /cgi-bin/webscr">http://IP address /cgi-bin/webscr</A>

paypal ipn is located in

http://www.yourstore.com/modules/gateways/paypal/paypal.ipn

and thats wot u should have in ur paypal account

I have my IPN set correctly with PP

http://www.sitename.com/store/modules/gateway/PayPal/ipn.php

I am not sure why PP is looking at

<A HREF="http://IP address /cgi-bin/webscr">http://IP address /cgi-bin/webscr</A>

I opened a ticket with PP so I should have feedback within 2-3 business days

Thanks

Thanks for the post go77306

I waited a few hours and my order has not changed from pending status

as requested my function pdtcheck():

////////////////////////////////

// Added by paypal auto return fix

////////////////////////////////

function pdtcheck()

{

global $db, $glob, $module, $basket;

// read the post from PayPal system and add 'cmd'

$req = 'cmd=_notify-synch';

$tx_token = $_GET['tx'];

logMsg( "" );

logMsg( "Using PDT to check order status for tx:".$tx_token );

$auth_token = "PP Token";

$req .= "&tx=$tx_token&at=$auth_token";

// post back to PayPal system to validate

$header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";

$header .= "Content-Type: application/x-www-form-urlencoded\r\n";

$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";

$fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);

// If possible, securely post back to paypal using HTTPS

// Your PHP server will need to be SSL enabled

// $fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30);

if (!$fp)

{

// HTTP ERROR

logMsg ("HTTP ERROR");

}

else

{

fputs ($fp, $header . $req);

// read the body data

$res = '';

$headerdone = false;

while (!feof($fp))

{

$line = fgets ($fp, 1024);

if (strcmp($line, "\r\n") == 0)

{

// read the header

$headerdone = true;

}

else if ($headerdone)

{

// header has been read. now read the contents

$res .= $line;

}

}

// parse the data

$lines = explode("\n", $res);

$keyarray = array();

if (strcmp ($lines[0], "SUCCESS") == 0)

{

for ($i=1; $i<count($lines);$i++)

{

list($key,$val) = explode("=", $lines[$i]);

$keyarray[urldecode($key)] = urldecode($val);

}

/**

* Check invoie, amount and receiver_email are correct

*/

$amount = $keyarray['payment_gross'];

$invoiceId = $keyarray['invoice'];

$receiver_email = $keyarray['receiver_email'];

$sqlstat = "SELECT * FROM ".$glob['dbprefix']."CubeCart_order_sum WHERE cart_order_id = ".$db->mySQLSafe($invoiceId);

$result = $db->select( $sqlstat );

if ( ($result[0]['prod_total'] == $amount ) && ( strcmp( $module['email'], $receiver_email ) == 0 ) )

{

logMsg ("Verify Success");

return TRUE;

}

else

{

logMsg ( "Verify Failed, Paypal response follows:" );

logMsg ( " Amount = " . $amount );

logMsg ( " Invoice = " . $invoiceId );

logMsg ( "Receiver Email = " . $receiver_email );

return FALSE;

}

}

else

{

logMsg ( "Payment Failed, Paypal response follows:" );

logMsg ( $res );

return FALSE;

}

}

fclose ($fp);

}

Link to comment
Share on other sites

Guest go77306

if you the order status is in pending after few hours of your payment, the your IPN is not working at all.

try to call your IPN.php directly from the browser (copy and paste the url to your firefox), see if the link is right.

Link to comment
Share on other sites

Guest dilinger

if you the order status is in pending after few hours of your payment, the your IPN is not working at all.

try to call your IPN.php directly from the browser (copy and paste the url to your firefox), see if the link is right.

I did as you suggested and called the ipn.php file from the browser and I received a blank screen. I expected either a blank screen or a page cannot be displayed screen.

I then placed a .jpg file in the same directory and I was able to access this directly with the browser.

I am not a programmer so I assume accessing the .jpg and the ipn.php not displaying a error is proof that the directory is not restricting access.

FYI

I did finally hear from PP and they said my IPN was tested and is working. I tried again and it failed so I sent PP my error log and I am waiting another 2-3 business days for feedback

Link to comment
Share on other sites

Guest dilinger

if you the order status is in pending after few hours of your payment, the your IPN is not working at all.

try to call your IPN.php directly from the browser (copy and paste the url to your firefox), see if the link is right.

I did as you suggested and called the ipn.php file from the browser and I received a blank screen. I expected either a blank screen or a page cannot be displayed screen.

I then placed a .jpg file in the same directory and I was able to access this directly with the browser.

I am not a programmer so I assume accessing the .jpg and the ipn.php not displaying a error is proof that the directory is not restricting access.

FYI

I did finally hear from PP and they said my IPN was tested and is working. I tried again and it failed so I sent PP my error log and I am waiting another 2-3 business days for feedback

I spoke with PP today and they checked the IPN on their end and the variables passed from CC. PP says they are posting to the correct location and they can't see how the post is going anywhere different. PP said there are only 2 ways to manipulate IPN URL.

1: The setting in IPN preferences

2: If the IPN URL is manipulated in the button or code being passed to IPN

Option 2 will override option 1

The only help PP could offer was maybe the host is redirecting the PP Post.

I am not sure about that because as I mentioned in post#7-I tried another PHP based cart and it worked perfect.

I welcome all feedback at this point

Thanks to all who posted

Link to comment
Share on other sites

go77306 (can we at least get a first name?) is right. Your IPN is not coming through. I'd like to take a look at the log output if I can. You can e-mail it to me at bill AT swscripts DOT com.

For whatever reason, your server is not getting in touch with PayPal. I don't know why yet.

:P

Link to comment
Share on other sites

  • 1 month later...

go77306 (can we at least get a first name?) is right. Your IPN is not coming through. I'd like to take a look at the log output if I can. You can e-mail it to me at bill AT swscripts DOT com.

For whatever reason, your server is not getting in touch with PayPal. I don't know why yet.

:)

I have the same problem as dillinger. I'm almost convinced it is a host issue as I have exhausted all reasonable attempts to make it work.
Link to comment
Share on other sites

Guest morgankhalil

same exact problem here, i even reinstalled cube to see if somehow somewhere i changed some code that could have caused this but it is still doing it :)

Link to comment
Share on other sites

Guest jiezhang8

go77306 (can we at least get a first name?) is right. Your IPN is not coming through. I'd like to take a look at the log output if I can. You can e-mail it to me at bill AT swscripts DOT com.

For whatever reason, your server is not getting in touch with PayPal. I don't know why yet.

;)

Hi, I have the similar problem. My paypal IPN is working, but not direct payment and express checkout. I have been trying every possible posted here to fix the problem.

I like CC, but this issue drives me crazy!!. I think CC should have step-by-step how-to instruction. It is such common problem.

I really hate to see I have to move to another cart and waste my lic fee. J

Link to comment
Share on other sites

  • 4 months later...
  • 2 weeks later...
Guest swoods

So, where are we at on resolving this problem. I am experiencing the same issue. I am now running 3.0.11 and have tried everything listed in all the previous posts. Still, I get Sorry, your order failed. The strange thing is, I receive the money in PP and the order is placed in CC. The orders status stays at pending though.

I have looked, relooked, and relooked at all my PP settings. They are all correct.

I have looked, relooked, and relooked at all my CC admin settings. They are all correct.

I am using the host G0Daddy .. is anyone else experiencing the issue using that host?

Link to comment
Share on other sites

Guest swoods

go77306 (can we at least get a first name?) is right. Your IPN is not coming through. I'd like to take a look at the log output if I can. You can e-mail it to me at bill AT swscripts DOT com.

For whatever reason, your server is not getting in touch with PayPal. I don't know why yet.

;)

I am having the same issues. Any ideas on what could be causing this message .. "Sorry, your order failed" I can email you my log data if you think it would help.

Link to comment
Share on other sites

  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...