PayPal stuck in "Authorization Pending" status...

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
crazyjoe
Commander (CMDR)
Commander (CMDR)
Posts: 172
Joined: Mon Apr 26, 2010 2:20 pm

Re: PayPal stuck in "Authorization Pending" status...

Post by crazyjoe » Fri Jul 16, 2010 8:51 am

Oh Mazher, that's the worst answer ever! I'm new to this whole bug report thing but here's what I saw. The bug progress report shows that you knew you weren't sending shipping addresses as far back as '07 (understood because PayPal didn't need them before). Then Logan figured it out, fixed it, then "accidentally committed to trunk." I dont' know what "committed to trunk" means. Then it says it can't be added to the 7.0.5 cart (WHAT!). Then it says there is a lack of momentum (OMG WHAT!) Can this be bumped up to any kind of priority bug to be added as a patch to a 7.0.4 cart? I've paid developers thousands of dollars to automate my backend to process orders on Able. This works perfectly except for Authorization Pending orders.

Can anyone suggest a company I can pay to custom write this code as I can't imagine it's that much of a change that needs to occur. You send shipping addresses to my other payment processors. You already have the shipping address info because the customer has to type it in before you can choose a payment method.
Crazy Joe Sadloski
Webmaster
Hot Leathers Inc.
http://www.hotleathers.com

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: PayPal stuck in "Authorization Pending" status...

Post by Logan Rhodehamel » Fri Jul 16, 2010 10:42 am

crazyjoe wrote:The bug progress report shows that you knew you weren't sending shipping addresses as far back as '07
I hate to discuss schedules but now it seems necessary. The issue of the PayPal Button and shipping addresses came to our attention in May. We were already past our scheduled date for having a freeze on new work to the release - so that we could reach our timeline. Working on the retail search (full text) has been a bit of a time sink and put us behind in the testing phase. Merchant sales depend on customers being able to find products. This is vital to the operation of the application and it has to be done right.

Because of the feature freeze, every new issue that was reported - unless it was a blocker issue - was automatically logged and assigned to our next batch of tasks. If we didn't take this measure, we would never finish a release. Actually the comment about momentum should be clarified. I had scheduled some time off at the beginning of July. We were not supposed to be working on 7.0.5 still. My time away caused Mazhar to run out of tasks - I pulled the PayPal shipping address as the most important work from the next set. I wanted to keep development progress moving.
crazyjoe wrote:Can anyone suggest a company I can pay to custom write this code as I can't imagine it's that much of a change that needs to occur. You send shipping addresses to my other payment processors. You already have the shipping address info because the customer has to type it in before you can choose a payment method.
The PayPal button code presents a few difficulties. One big one is the multiple ship-to scenario. The button only accepts a single address. Maybe this is a good question for those of you using it. If a customer had chosen multiple ship-to addresses, would you prefer the shipping address not be sent as it does now? Or would you prefer we send one of the addresses?

I also want to raise an issue that's come up in our discussion of this issue. If the order is showing as paid in the PayPal merchant admin, it doesn't make a lot of sense that this is the reason for the auth pending status in AbleCommerce. I'm worried there might be some other problem that's interfering with the IPN. Along these lines it seems three possibilities.

1) The "auto click" feature as discussed in this thread is not in place. So some customers may never realize they need to take the additional step of providing payment.

2) Lack of shipping address data causes authorizations to not complete. This could be a cause, but only if you can confirm that on the PayPal merchant admin side of things, customers provide payment but PayPal never shows the payment as paid. I'm not speaking of AbleCommerce admin, but the PayPal admin.

3) Some problem with interpreting the instant payment notification (IPN) from PayPal. IPN is not perfect - e.g. PayPal doesn't automatically resend it if your site fails to respond. Whether or not this is a problem is hard to know, it somewhat depends on #2.

I hope this information helps. The problem of shipping addresses is not being ignored. It just didn't prove to be as clear cut as I'd hoped. Some feedback on the above points may help sort it out.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

User avatar
GrfxDan
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 82
Joined: Sat May 26, 2007 10:58 am
Location: Mt Zion, IL
Contact:

Re: PayPal stuck in "Authorization Pending" status...

Post by GrfxDan » Fri Jul 16, 2010 11:13 am

Hi Logan,

I'll try to be as helpful as possible with the knowledge I have about this problem.

First, regarding what I would like to see on the multiple ship-to addresses, I think a reasonable solution would be to send the address which receives the majority of the order. This would be determined by the value of the items sent, not the number of items sent.

Second, regarding the IPN problem possibilities, I do not think your option #1 is a possibility because I still receive email notifications from payment that I've received an "Instant Payment" and the payments are showing up in PayPal as "Completed" and "Cleared". So, the payment is being provided. This is not simply a case of customers not clicking through to PayPal to make the payment. Option #2 would also suggest that the payment itself is not being completed. The payments ARE being completed. The funds DO appear in my account. PayPal shows the payment was completed. Option #3 is a possibility, I suppose. Still, it makes more sense to me that the problem may result when a customer uses the AbleCommerce checkout and selects "PayPal" as the payment method but not occur when a customer uses the "PayPal Express Checkout" button, which bypasses the AbleCommerce checkout entirely (and also eliminates the possibility of multiple ship-to addresses). Is there a way to eliminate "PayPal" as a payment method in the AbleCommerce checkout and yet still show the PayPal Express Checkout button? If so, this could serve as a test to see if the problem continues. It would atleast tell us if the problem is related to both checkout methods or not.

Hope that helps,

Dan
<><
Image

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: PayPal stuck in "Authorization Pending" status...

Post by Logan Rhodehamel » Fri Jul 16, 2010 11:40 am

GrfxDan wrote:The payments ARE being completed. The funds DO appear in my account. PayPal shows the payment was completed. Option #3 is a possibility, I suppose.
It helps. This is the part I keep coming back to. I am unconvinced the authorization pending status is related to shipping address for the button. I'm leaning toward alternative explanations and these deal with the IPN. Mazhar and I have been actively discussing the problem and how we can go about troubleshooting. Issues that happen sporadically are the hardest to track down.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

User avatar
GrfxDan
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 82
Joined: Sat May 26, 2007 10:58 am
Location: Mt Zion, IL
Contact:

Re: PayPal stuck in "Authorization Pending" status...

Post by GrfxDan » Fri Jul 16, 2010 12:00 pm

Yeah, I'm not sure if it's a shipping address problem or not. I've not been able to distinguish any differences between PayPal orders that show the correct status versus those that incorrectly show the "authorization pending" status. What I do know is that AbleCommerce is not showing the correct status for SOME of the orders that I receive which are paid via PayPal. I am curious whether or not there's a difference if someone uses the PayPal Express Checkout or selects PayPal as the payment method during the AbleCommerce checkout. I don't know how to tell the difference after an order is placed. Is there a way to tell? If there's anything you'd like for me to do to help just let me know.
Image

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: PayPal stuck in "Authorization Pending" status...

Post by mazhar » Fri Jul 16, 2010 12:03 pm

I tried a fix to send shipping address along with payment information. Give a try to this code for testing. Extract the zip file and install the files to your website in same order. Please take backup of your website/conlib/utility/PayPalPayNowButton.ascx and website/conlib/utility/PayPalPayNowButton.ascx.cs files because you need to replace these files with the ones available in this fix package. Once you are done with this then edit your web.config file and locate following code line in it

Code: Select all

</assemblies>
and then update it as below

Code: Select all

<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
			</assemblies>
Save the web.config and test again by placing a test order.

Actully in this fix I tried to send shipping address in PayPalPayNowButton.ascx.cs file. So if you need to adjust some parameter then edit and look into this file.

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: PayPal stuck in "Authorization Pending" status...

Post by Logan Rhodehamel » Fri Jul 16, 2010 12:12 pm

It seems this will only work if you have .NET 3.5 installed, would that be right Mazhar?
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: PayPal stuck in "Authorization Pending" status...

Post by mazhar » Fri Jul 16, 2010 1:30 pm

Yes Logan you are right. Sorry I should have mention in my last comment.

User avatar
GrfxDan
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 82
Joined: Sat May 26, 2007 10:58 am
Location: Mt Zion, IL
Contact:

Re: PayPal stuck in "Authorization Pending" status...

Post by GrfxDan » Fri Jul 16, 2010 1:34 pm

I am running .NET 3.5 so I'll implement the changes and see if the problem continues. I'm not sure how to place a test order via PayPal, though.
Image

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: PayPal stuck in "Authorization Pending" status...

Post by Logan Rhodehamel » Fri Jul 16, 2010 1:54 pm

I will also note that the code Mazhar posted uses the billing address as the shipping address. This will be frequently be correct, but not always. I think Mazhar just thought of using ResponseFilter late this afternoon. Perhaps on Monday he can continue on this path and put in the logic we've been working out for choosing the right shipping address.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

crazyjoe
Commander (CMDR)
Commander (CMDR)
Posts: 172
Joined: Mon Apr 26, 2010 2:20 pm

Re: PayPal stuck in "Authorization Pending" status...

Post by crazyjoe » Tue Jul 20, 2010 12:54 pm

Logan, thank you very much for you explanation above. I applied Mazhar's files above to my dev site and it did correctly send my shipping address to PayPal and my PayPal admin shows I can ship to this customer. The PayPal admin shows the exact same status' as my orders that use PayPal Express and don't have the status Authorization Pending. However, my Able admin still shows Authorization Pending. I called PayPal to ask how two orders that have confirmed shipping addresses could come back with different status'. They assured me they do not see a difference in orders on their end both orders are correctly authorized.

This is a big step, as it all made sense for me to think it was just a shipping address issue but now I am definitely sending shipping addresses and I am still stuck with "Authorization Pending". I can confirm that in all of my tests, using my live site and dev site I have a license for. Both using 7.0.4 and making orders using my personal PayPal to every order I place with PayPal via my OnePageCheckout payment method table gives me an status of "Authorization Pending." This happens on orders that the customer does not complete (meaning they do not click the ridiculous PayPal button on the receipt page) as well as orders that customers appropriately complete (now including Shipping Addresses {Thanks Mazhar}).

Mazhar's files did not work on my live site, the web.config change made all my pages fail, and the conlib/utility files gave an error when I put the web.config file back to my original. No biggie, as I may have customized these files, my dev site is pretty much right out of the box both using AC74_B13424_UPGRADE.
Crazy Joe Sadloski
Webmaster
Hot Leathers Inc.
http://www.hotleathers.com

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: PayPal stuck in "Authorization Pending" status...

Post by mazhar » Fri Jul 23, 2010 10:21 am

Joe can you turn on the web trace on your development setup and then post back the trace for PayPalProcessor.ashx file? This may provide some useful debug information that can help us figure out this problem.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: PayPal stuck in "Authorization Pending" status...

Post by mazhar » Fri Jul 23, 2010 10:50 am

One more thing make sure that your IPN URL is not password protected.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: PayPal stuck in "Authorization Pending" status...

Post by mazhar » Mon Jul 26, 2010 6:30 am

Folks I have spent some time digging around the issue. It seems to me that we have been distracted by PayPal's comment that it may be due to absence of shipping address. I have configured sandbox setup on our online dev install properly and I can see that its working just fine. So I believe that its because of some missing configuration on your part. I am going to explain all configurations required here so just configure it accordingly and then try placing some demo orders with PayPal and then paying them via PayNow button.

1- Go to your PayPal seller account and then navigate to Profile -> Website Payment Preferences page.
2- Set Auto Return to on
3- set Return URL to yourdomainname/ProcessPayPal.ashx for example for Joe's store it would be http://www.myglamboutique.com/ProcessPayPal.ashx
4- set Payment Data Transfer to on
5- Save the settings.
6- Go to profile -> Instant Payment Notification (IPN) page
7- Edit the settings and select Receive IPN messages (Enabled) and then specify notify url as yourdomainname/ProcessPayPal.ashx for example for Joe's store it would be http://www.myglamboutique.com/ProcessPayPal.ashx
8- Save the settings.
9- Now try placing some orders using PayPal and then Paying them via PayNow button.

User avatar
GrfxDan
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 82
Joined: Sat May 26, 2007 10:58 am
Location: Mt Zion, IL
Contact:

Re: PayPal stuck in "Authorization Pending" status...

Post by GrfxDan » Mon Jul 26, 2010 8:48 am

Mazhar,

Thanks for the step-by-step. I don't know if this will fix the problem but I'm hopeful. Items 2-4 were not configured correctly in my PayPal account. I've fixed that and will see if I get anymore incorrect status orders. I typically only receive a couple a week so I'll have to wait and see. I'm not sure how to place a demo order via PayPal. Every time I've tried I receive a message saying I can't place an order using the PayPal account that the payment is going to. I'll repost to let you know if I receive any incorrect status orders within the next couple of weeks. Thanks again.
Image

crazyjoe
Commander (CMDR)
Commander (CMDR)
Posts: 172
Joined: Mon Apr 26, 2010 2:20 pm

Re: PayPal stuck in "Authorization Pending" status...

Post by crazyjoe » Mon Jul 26, 2010 10:19 am

OK, I followed your steps. I also had steps 2 - 4 setup differently due to what I had read in earlier forum posts (those should all be updated to say that this is the correct configuration). However, this still did not work. I think it would help if I had a "ProcessPayPal.ashx" file on the root of my server. I never got that file with any of my able installs. Should I have this file? This may help. My errors are below...

My admin shows this in my error logs..
An error has occured at https://www.hotleathers.com/ProcessPayP ... em_number=

{Debug Data} Object reference not set to an instance of an object

I turned custom errors off and got the following err...

Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
CommerceBuilder.Payments.Providers.PayPal.IpnProcessor.ProcessRequest(HttpContext context) +408
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
Crazy Joe Sadloski
Webmaster
Hot Leathers Inc.
http://www.hotleathers.com

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: PayPal stuck in "Authorization Pending" status...

Post by mazhar » Mon Jul 26, 2010 10:31 am

You have the ProcessPayPal.ashx on root. Actually this file is in back end code and mapped to domainname/ProcessPayPal.ashx. You are getting error because you are trying to open the file in browser and there is no data which it expects so its OK. Please go to your PayPal account and then to profile -> IPN Notifications and finally open IPN history and see what is the status of IPN messages that PayPal tried to send to your store against recent test orders.

Secondly I guess you are trying these tests on your dev website. If this is the case, then is this dev setup is available online and you provided your dev website IPN handler URL in notify URL on website. I mean make sure that you are not placing orders on dev setup while sending IPN messages to your live store or perhaps if dev website is offline then PayPal could have problems accessing IPN handler URL.

crazyjoe
Commander (CMDR)
Commander (CMDR)
Posts: 172
Joined: Mon Apr 26, 2010 2:20 pm

Re: PayPal stuck in "Authorization Pending" status...

Post by crazyjoe » Mon Jul 26, 2010 11:34 am

Unfortunately I have to be doing this on my live site, but I'm being careful as to not create issue for customers. I've compared 2 IPN history reports for orders using PayPal Express and one using the PayPal Payment Method from OnePageCheckout. One difference is the correctly working PayPal Express transactions shows my Notification URL as http://www.hotleathers.com//ProcessPayPal.ashx where as the order that I'm "waiting for IPN" shows a Notification URL as https://www.hotleathers.com/ProcessPayP ... erId=14399. I am still getting an error when returning to my site from PayPal orders using this method.

We must be sending up code telling PayPal to dynamically create my Notifcation URL as opposed to using the default setting I've setup in PayPal. I have triple checked to see that my Notification URL is set to... http://hotleathers.com/ProcessPayPal.ashx in my IPN settings in PayPal. Please also notice the double // in both URL's that PayPal is getting from us.
Crazy Joe Sadloski
Webmaster
Hot Leathers Inc.
http://www.hotleathers.com

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: PayPal stuck in "Authorization Pending" status...

Post by Logan Rhodehamel » Mon Jul 26, 2010 11:36 am

That helps. Mazhar is working on this right now. I think he'll have some more to add soon.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

crazyjoe
Commander (CMDR)
Commander (CMDR)
Posts: 172
Joined: Mon Apr 26, 2010 2:20 pm

Re: PayPal stuck in "Authorization Pending" status...

Post by crazyjoe » Mon Jul 26, 2010 11:40 am

"waiting for IPN" shows a Notification URL as https://www.hotleathers.com/ProcessPayP ... erId=14399
Correction The Notification URL is https://www.hotleathers.com//ProcessPay ... erId=14399 with the double "//"

Another difference in the IPN message is the transaction that has the Notification URL that is giving me this error has a trasaction_subject=14399. There is no trasaction_subject in the IPN message for the transaction that used PayPal Express. Could this field be forcing my Notification URL to add the https and the ?OrderId=14399 which seems to be causing my error?
Crazy Joe Sadloski
Webmaster
Hot Leathers Inc.
http://www.hotleathers.com

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: PayPal stuck in "Authorization Pending" status...

Post by mazhar » Tue Jul 27, 2010 10:26 am

Well I have tested the orders on our 7.0.4 live dev setup and it seems to be working for me. I think we need some debug information to get a better view. I just created a WIKI topic about how to debug the PayPal IPN handler here at
http://wiki.ablecommerce.com/index.php/ ... .NET_Trace

I want you to try this debug method. Then we will be able to see the information in trace viewer. This will help us narrow the problem for example we be able to see whether our handler is getting called by PayPal or not, we are getting transaction details in handler or not.

crazyjoe
Commander (CMDR)
Commander (CMDR)
Posts: 172
Joined: Mon Apr 26, 2010 2:20 pm

Re: PayPal stuck in "Authorization Pending" status...

Post by crazyjoe » Tue Jul 27, 2010 11:48 am

After I pay in paypal I get sent to... https://www.hotleathers.com//ProcessPay ... em_number=

I turned custom errors off and I get the following stack trace...
[NullReferenceException: Object reference not set to an instance of an object.]
CommerceBuilder.Payments.Providers.PayPal.IpnProcessor.ProcessRequest(HttpContext context) +409
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


I do not get anything in my trace viewer.
Crazy Joe Sadloski
Webmaster
Hot Leathers Inc.
http://www.hotleathers.com

User avatar
GrfxDan
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 82
Joined: Sat May 26, 2007 10:58 am
Location: Mt Zion, IL
Contact:

Re: PayPal stuck in "Authorization Pending" status...

Post by GrfxDan » Tue Jul 27, 2010 1:43 pm

Just FYI, after following Mazhar's steps in his post above, correctly setting all of the PayPal settings, I'm still getting orders with the wrong status (showing as Authorization Pending when in fact the payment has been Completed).
Image

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: PayPal stuck in "Authorization Pending" status...

Post by Logan Rhodehamel » Tue Jul 27, 2010 4:03 pm

crazyjoe wrote:I do not get anything in my trace viewer.
I updated Mazhar's wiki post regarding how to turn on tracing. In your case, the configuration for trace might need to allow views from other than the localhost domain?

The error message by itself does not give us enough information. The trace output will give us a better idea of what is happening when the PayPal server calls your AbleCommerce store to give the updated payment status.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

crazyjoe
Commander (CMDR)
Commander (CMDR)
Posts: 172
Joined: Mon Apr 26, 2010 2:20 pm

Re: PayPal stuck in "Authorization Pending" status...

Post by crazyjoe » Wed Jul 28, 2010 7:15 am

I updated my web.config with Mahzar's wiki. I got 2 entries in my Trace viewer for ProcessPayPal.ashx. The first is a 302 POST and the second is a 500 GET. I don't see any "transaction details" anywhere in either of the detailed views. I am not really clear if I should be looking in the view details of each of the ProcessPayPal.ashx entries in my trace viewer or where the transaction details would be. Can you clarify that. If it's in the detailed views what exactly am I looking for? Order total, order items, etc..?
Crazy Joe Sadloski
Webmaster
Hot Leathers Inc.
http://www.hotleathers.com

Post Reply