PayPal stuck in "Authorization Pending" status...

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
wave_werks
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 91
Joined: Mon Sep 22, 2008 8:37 pm
Location: Northeast Ohio
Contact:

PayPal stuck in "Authorization Pending" status...

Post by wave_werks » Wed Apr 21, 2010 7:08 pm

Hello!

We're working on another Able website (http://www.myglamboutique.com) and we have PayPal problem that won't go away. Hopefully someone here can lend a helping hand.

Our Able build for this site is:
PLATFORM: ASP.NET
VERSION: 7.0
BUILD: 10863

What's happening is that we're able to complete an order and make payments with PayPal just fine. The problem is that PayPal is not reporting back to Able that the payment has been made. Or, Able is not receiving the IPN from PayPal. IPN on the PayPal account is enabled as required by both Able and PayPal. The PayPal settings are pictured below.
Website_PaymentPreferences-1.png
Website_PaymentPreferences-2.png
Website_PaymentPreferences-3.png
With these setting in place the Payment status of all order is never resolves to "Paid" but instead remains as "Authorization Pending". We have another site with exactly the same settings and it works just fine. We're uncertain if there's another setting aside from these PayPal Website Payment Preferences and the PayPal IPN settings that needs to be enabled or disabled to get Able to see when a payment is being made.

Anyone here have any ideas to share? All ideas, comments, and suggestions are welcome and greatly appreciated.

Thanks!
- Jeff
Wave Werks

wave_werks
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 91
Joined: Mon Sep 22, 2008 8:37 pm
Location: Northeast Ohio
Contact:

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

Post by wave_werks » Mon May 10, 2010 7:56 pm

Anyone have any ideas? Suggestions? Comments?

Moderators? Anyone?
- Jeff
Wave Werks

User avatar
batmike
Commander (CMDR)
Commander (CMDR)
Posts: 123
Joined: Tue Sep 04, 2007 10:46 am
Location: Minneapolis, MN
Contact:

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

Post by batmike » Tue May 11, 2010 6:59 am

I went through your checkout process and with the paypal function that you have set where you choose paypal on the one page checkout, within AbleCommerce, the customer finishes the sale and then they must click on a button on the receipt page that says Pay Now with Paypal. Then they'll be transferred to Paypal and make the payment and it will be sent to your store and marked as payment pending or paid depending on your settings. However, a lot of our customers never notice this button and then it will just stay on Authorization pending forever, since they never actually make the payment.

I modified our receipt page to display a note in red text at the top if the payment is made that way that tells them to scroll down and click the button to make the payment and complete the order. I think this has helped somewhat and if you're interested, I can post up the code I used.

Another idea would be to use the PayPal button on the Basket page, which completes the whole transaction through PayPal and sends you the payment and everything right away. This method is a lot less confusing but they'll also not be able to use gift certificates, as that's the other option on your one page checkout.

Hope that helps and let me know if you have any questions or would like that code.

-Mike

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 May 11, 2010 2:59 pm

I am continuously hammered with the "Authorization Pending" orders everyday. Here are the two issues that need to be fixed with a patch immediately.

1. OnePageCheckout should show the "Click Here To Pay with PayPal" button when PayPal is selected as a payment method. Sending people to a receipt page in which you've hidden a button that we cannot customize is wrong. We need a patch that makes the Pay with PayPal button show up on the OnePageCheckout page when PayPal is chosen as the payment method.

2. Shipping addresses need to be sent to paypal with order info. It was not necessary before, however now PayPal will not correctly authorize my orders without a shipping address being sent over. So we need a patch that either sends shipping info with our order or tells PayPal to ask for a shipping address.

Both of these are issues that need to be patched in my AbleCommerce 7.0.4 cart. If anyone has a work around I'd love to hear it. So far this is causing constant headaches for my finance department and customer service reps.
Crazy Joe Sadloski
Webmaster
Hot Leathers Inc.
http://www.hotleathers.com

bhill
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 84
Joined: Mon Oct 31, 2005 5:06 pm
Location: Institute

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

Post by bhill » Wed Jun 09, 2010 2:35 pm

We are having the same problem. 7.04 with patched dlls anyone know how to fix this?
please advise

Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

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

Post by Mike718NY » Wed Jun 09, 2010 5:09 pm

crazyjoe wrote:I am continuously hammered with the "Authorization Pending" orders everyday. Here are the two issues that need to be fixed with a patch immediately.

1. OnePageCheckout should show the "Click Here To Pay with PayPal" button when PayPal is selected as a payment method. Sending people to a receipt page in which you've hidden a button that we cannot customize is wrong . . . . .
I'll take that one step further:

On the OnePageCheckout, after "Click Here To Pay with PayPal" button is shown
when PayPal is selected as a payment method, . .

The customer should be taken to PayPal right away, forget the Receipt page.

And you can have the customer see the Reciept page when they click "return to store"
from the PayPal screen.

I improved the PayPal screens quite a few times, .. made big fonts saying "Go to PayPay"
blah, blah, but still getting people not going to paypal.

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 » Wed Jun 09, 2010 8:51 pm

Mike718NY wrote:On the OnePageCheckout, after "Click Here To Pay with PayPal" button is shown
when PayPal is selected as a payment method, . .

The customer should be taken to PayPal right away, forget the Receipt page.

And you can have the customer see the Reciept page when they click "return to store"
from the PayPal screen.
I COMPLETELY AGREE!!! Why this wasn't the way AbleCommerce set things up in the very beginning is beyond me. I'd LOVE to see this problem fixed with Mike's solution. GREAT ONE!
Image

User avatar
compunerdy
Admiral (ADM)
Admiral (ADM)
Posts: 1283
Joined: Sun Nov 18, 2007 3:55 pm

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

Post by compunerdy » Wed Jun 09, 2010 10:38 pm

Double check what is shown in this post viewtopic.php?f=42&t=12865

I use paypal and have no problems

User avatar
mikek
Commander (CMDR)
Commander (CMDR)
Posts: 112
Joined: Wed Oct 15, 2008 9:30 pm
Location: Boston, MA
Contact:

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

Post by mikek » Thu Jun 10, 2010 4:42 pm

Hello,

We have fixed the issue for one of our clients by automatically forwarding visitors to PayPal from the receipts page by simulating PayPal button click using Reflection. The issue is that
the PayPal logic is being implemented in the CommerceBuilder layer and can not be extended. Using reflection to hack the CommerceBuilder PayPal logic is not the best solution from
developer's perspective, but we could not find another way to get around this.

ConLib\Utility\PayPalPayNowButton.ascx.cs

protected void Page_Load(object sender, EventArgs e)
{
Payment paymentItem = PaymentDataSource.Load(this.PaymentId);

if (paymentItem != null)
{
if (((paymentItem.PaymentStatus == PaymentStatus.Unprocessed) || (paymentItem.PaymentStatus == PaymentStatus.AuthorizationPending)) && (paymentItem.PaymentMethod != null) && (paymentItem.PaymentMethod.PaymentInstrument == PaymentInstrument.PayPal))
{
PaymentGateway gateway = CommerceBuilder.Payments.Providers.PayPal.PayPalProvider.GetPayPalPaymentGateway(true);
if (gateway != null)
{
PayPalProvider provider = (PayPalProvider)gateway.GetInstance();
Control payNowButton = provider.GetPayNowButton(paymentItem.Order, paymentItem.PaymentId);
if (payNowButton != null) phPayNow.Controls.Add(payNowButton);

if (_AutoClick)
{
Type t = typeof(PayNowButton);
object[] p = new object[2];
p[0] = payNowButton;
p[1] = null;
MethodInfo m = t.GetMethod("PayNowButton_Click", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.IgnoreCase);
object o = m.Invoke(payNowButton, p);
}
}
}
}
}
Mike Kolev

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 Jun 30, 2010 7:16 am

Darn, this didn't work for me. Any other ideas? Should I have been able to just copy and paste this into my ConLib\Utility\PayPalPayNowButton.ascx.cs file?
Crazy Joe Sadloski
Webmaster
Hot Leathers Inc.
http://www.hotleathers.com

User avatar
mikek
Commander (CMDR)
Commander (CMDR)
Posts: 112
Joined: Wed Oct 15, 2008 9:30 pm
Location: Boston, MA
Contact:

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

Post by mikek » Wed Jun 30, 2010 7:00 pm

Below is a copy of the modified PayPalPayNowButton.ascx.cs

If the AutoClick property is set to True the control will simulate PayPal button click and will automatically forward the client to the PayPal site. You have to set the AutoClick flag in
your ReceiptPage.ascx.cs

Code: Select all


    private bool _PayPalRedirect = true;
    public bool PayPalRedirect
    {
        get { return _PayPalRedirect;  }
        set { _PayPalRedirect = value; }
    }


    protected void Page_PreRender(object sender, EventArgs e)
    {
        pnlPayPalInstructions.Visible = false;
        PaymentPanel.Visible = false;

        foreach(Payment p in Order.Payments)
        {
            if (p.PaymentMethod.PaymentInstrument == PaymentInstrument.PayPal)
            {
                PaymentPanel.Visible = true;
                pnlPayPalInstructions.Visible = true;
                _PayPalRedirect = true;
                break;
            }
        }
    }



ReceiptPage.ascx

Code: Select all

<uc:PayPalPayNowButton ID="PayPalPayNowButton" runat="server" PaymentId='<%#Eval("PaymentId")%>' AutoClick='<%#this.PayPalRedirect%>'></uc:PayPalPayNowButton>
ConLib\Utility\PayPalPayNowButton.ascx.cs

Code: Select all

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CommerceBuilder.Orders;
using CommerceBuilder.Payments;
using CommerceBuilder.Payments.Providers.PayPal;
using System.Reflection;

public partial class ConLib_Utility_PayPalPayNowButton : System.Web.UI.UserControl
{
    private int _PaymentId;
    public int PaymentId
    {
        get
        {
            return _PaymentId;
        }
        set
        {
            _PaymentId = value;
        }
    }

    private bool _AutoClick = false;
    public bool AutoClick
    {
        get
        {
            return _AutoClick;
        }
        set
        {
            _AutoClick = value;
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        //DrundoSoftware
        Payment paymentItem = PaymentDataSource.Load(this.PaymentId);
        if (paymentItem != null)
        {
            if (((paymentItem.PaymentStatus == PaymentStatus.Unprocessed) || (paymentItem.PaymentStatus == PaymentStatus.AuthorizationPending)) && (paymentItem.PaymentMethod != null) && (paymentItem.PaymentMethod.PaymentInstrument == PaymentInstrument.PayPal))
            {
                PaymentGateway gateway = CommerceBuilder.Payments.Providers.PayPal.PayPalProvider.GetPayPalPaymentGateway(true);
                if (gateway != null)
                {
                    PayPalProvider provider = (PayPalProvider)gateway.GetInstance();
                    Control payNowButton = provider.GetPayNowButton(paymentItem.Order, paymentItem.PaymentId);
                    if (payNowButton != null) phPayNow.Controls.Add(payNowButton);

                    if (_AutoClick)
                    {
                        Type t = typeof(PayNowButton);
                        object[] p = new object[2];
                        p[0] = payNowButton;
                        p[1] = null;
                        MethodInfo m = t.GetMethod("PayNowButton_Click", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.IgnoreCase);
                        object o = m.Invoke(payNowButton, p);
                    }
                }
            }
        }
    }
}

Mike Kolev

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 02, 2010 10:00 am

Sorry to be a pain but I added your coding to the very end of my ReceiptPage.ascx.cs and I replaced my <uc:PayPalPayNowButton... with the code you provided and I used your entire code for the PayPalPayNowButton.ascx.cs. I get an error when my site tries to load the receipt page. Can you tell me where exactly your coding on the ReceiptPage.ascx.cs should go? It seems like it should be put at the end of the file. Does it replace coding that is already in that file? Once again I am sorry for being so ignorant to this, I am a great copy and paster but other then that, I'm kinda new to the .net stuff.
Crazy Joe Sadloski
Webmaster
Hot Leathers Inc.
http://www.hotleathers.com

User avatar
mikek
Commander (CMDR)
Commander (CMDR)
Posts: 112
Joined: Wed Oct 15, 2008 9:30 pm
Location: Boston, MA
Contact:

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

Post by mikek » Fri Jul 02, 2010 1:46 pm

The ReceiptPage.ascx.cs code describes the logic that need to be implemented in the default Page_PreRender() method. If you just replace the Page_PreRender() method code with the code above it should work.
However the code above may conflict with other custom code changes made to ReceiptPage.ascx.cs. If you are still getting exceptions you may have to contact the developers who did the initial integration and customization for your site and ask them to integrate the PayPal logic for your site.
Mike Kolev

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 09, 2010 2:15 pm

The issue PayPal says I need to address is the issue of not having a shipping address sent along with the order to PayPal. When I view my order in PayPal it says there is no shipping address and that is why Able has a Authorization Pending status because PayPal is expecting a shipping address and Able doesn't send it. Is that what this will fix or is this just going to fix the issue of having to click the button on the receipt page?
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 » Fri Jul 09, 2010 4:02 pm

I've been experiencing this problem for approximately 3 weeks now. It started abruptly and continues to this day. Not all PayPal orders get "Stuck" in authorization pending but SOME do. I've not been able to figure out why. I've tried going into PayPal and resending the IPN messages in attempt to trigger the correct status but it doesn't work. The only thing I've been able to do is manually verify that the payment has cleared and then manually change the payment status in AC7. Prior to this issue popping up everything was working fine and the payment status for all PayPal orders was correct. I'd sure like to see a solution to this too...
Image

User avatar
compunerdy
Admiral (ADM)
Admiral (ADM)
Posts: 1283
Joined: Sun Nov 18, 2007 3:55 pm

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

Post by compunerdy » Fri Jul 09, 2010 7:46 pm

I have nothing to contribute except to say mine works fine except once in awhile on foreign customers it will stay pending even though it was paid.

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 09, 2010 8:45 pm

Every time it's happened to me has been with a domestic order but that's not to say it couldn't/wouldn't also happend with an international order. I don't get too many of those and most of the ones I do get pay with a credit card, not PayPal.
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 » Tue Jul 13, 2010 9:38 am

I am getting these everyday and it is a real easy fix as far as paypal says. Every order that has the Authorization Pending status has no shipping address in PayPal. It's just an issue of having Able send the shipping address with the order. Is there anyone that can re-write my Able to do this? I really need it bad. It's a ridiculous amount of time needed to find each order in PayPal and capture them manually when you have a bunch of orders like this everyday.
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 13, 2010 10:39 am

Does your order contains shippable items? Does your order contains multiple shipments? I mean can you describe the details of such orders, also if there is something common in these problematic orders?

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 13, 2010 10:54 am

Mazhar,

All of my orders contain shippable items and all of them have shipping addresses associated with them. I don't know why PayPal is telling Joe that it's a problem with the shipping address not being passed on. If this were the case then I would assume Able passes the same fields of information with every order and therefore this problem would either exist or not exist with every PayPal order. Some of my orders, which are paid via PayPal, have this problem and some do not. I haven't been able to distinquish any similarities among the orders that do have the payment get stuck in the "Pending" status. I know that probably doesn't help much but that's all I can tell you about the problem. I'd be glad to answer any other questions you have about it.

Dan
<><
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 » Tue Jul 13, 2010 11:13 am

Thanks Dan that's why I asked the question. I am sure that we are sending shipping address so I tried to narrow the problem with some different cases. For example we may not be sending shipping address if its an order with digital goods(billing address only). Although it doesn't make any sense to send shipping address for non shippable order. I am not sure about PayPal's response. Let's see if Joe can provide some details about his orders having problem that could help narrowing the situation. BTW do you have something in Error Log against any of those orders?

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 13, 2010 11:40 am

I'll have to check my error log the next time I get one of these. I don't have any way of knowing which orders had a problem after I update the payment status so I can't go back and look on previous orders.
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 » Thu Jul 15, 2010 12:00 pm

All my orders are for shippable products and none of my orders need multiple shipments. I have my PayPal Express button on my view cart page and the many of my customers using PayPal see that and click that. Others use the checkout button and choose PayPal as a "Payment Method" I have tested orders using both PayPal options and the Express version works everytime, and the "Payment Method" options gets stuck in "Authorization Pending" status everytime. When I view the order in my PayPal admin it says "No Shipping Address" where as my order using my PayPal Express method has a "Shipping Address" (becuase PayPal Express has you enter your shipping address on their site and sends it back to able). I have tested this with a couple different PayPal accounts. There is nothing in the error logs. I am using AC74_B13424_UPGRADE. Thanks for hopping on this Mazher, I know you'll save the day!
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 » Fri Jul 16, 2010 7:15 am

I hadn't even considered the fact that there's two ways to checkout using PayPal. This could definitely explain why some PayPal orders are stuck and some are not. Perhaps Able is not sending a shipping address to PayPal when the user selects PayPal as the payment method on the checkout page instead of using the PayPal Express Checkout button? Joe may be on to something there. I do know that when I get an order that's stuck and I go to PayPal to have the IPN for the order resent it still does not trigger the "completed" status for the payment. Maybe this is because no shipping address was sent with the payment? It makes sense that orders where the user has used the PayPal Express Checkout would get updates because as Joe stated the shipping address is entered on PayPal's site and then sent back to Able.
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 7:20 am

You can track progress about sending shipping address through paynow button here
http://bugs.ablecommerce.com/show_bug.cgi?id=8888

Post Reply