6 replies [Last post]
IT Guy 3000's picture
Offline
Joined: 05/11/2009
Juice: 121
Was this information Helpful?

Hello,

Using Ubercart 1.x on Drupal 5.17 with PayPal Website Payments Pro as the payment gateway. All works great with just this small issue at the moment:

Payment processing is set to "authorize," not "complete sale." Ubercart sees the auth as payment so it sets the order balance to $0.00. Then, when an order is shipped, we log in to our PayPal account, find the authorization, and click the "Capture" button to actually charge the customer's card. This sends back an IPN and in Ubercart the order shows both the auth and the capture as payments, creating a negative balance equal to the order total.

Is there a setting in Ubercart or PayPal that I've missed somewhere to prevent this from happening? Want the auth to process and show up in the order history, with the balance set to $0.00, and want the final capture to show up in the order history if possible, but don't want the capture to create another debit in the order history.

Thanks much!

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Paypal Website Payments Pro - "Capture" creates negative bal

Hmm... sounds like a bug in the PayPal module perhaps? There ought to be an exception that checks the transaction type so as to not report authorizations as payments received. I don't suppose you can check it out in the code? If not, let me know and I'll check it out.

IT Guy 3000's picture
Offline
Joined: 05/11/2009
Juice: 121
Re: Re: Paypal Website Payments Pro - "Capture" creates negative

Hi Ryan ... thanks for the quick reply.

I've just taken over managing an older Ubercart installation. For payments, we've got PayPal 5.x-1.0-beta4 (indeed, that's what most of this Ubercart installation is). If I upgrade that module alone (if possible? is it in the core?), will that address this issue? Trying to avoid too much time on upgrades and tweaking as we'll soon go to Ubercart 2.x., but would like to fix this little dealio in the meantime if possible. Let me know your thoughts. Thanks!

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Paypal Website Payments Pro - "Capture" creates nega

Schnikes! That's an old site. Laughing out loud

Actually, because of changes in the CC API since that beta release, I really don't think you can just update the PayPal module.

IT Guy 3000's picture
Offline
Joined: 05/11/2009
Juice: 121
You're not kidding The

You're not kidding Smiling The whole site was on Drupal 5.6 until I upgraded it a couple weeks ago, but haven't yet done the Ubercart upgrade. Have been trying to quickly fix a few things without breaking anything (like USPS international shipping last week), as it will be a month or so before it's possible to do a full Ubercart upgrade.

Is there possibly a quick workaround using Workflow-ng? I've just started figuring out that module. I know it can take or not take certain actions based on payment processing activities, yes? It'd be fine for now if the authorization continued to reflect as payment in full, as long as the subsequent PayPal capture is ignored in the payment history.

In any event, I won't waste your time with fixes to an Ubercart installation that's so old it runs on coal Eye-wink

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: You're not kidding The

Hmm... I'm not sure if there's a viable Workflow-ng workaround or not. The problem is the Wf-ng event for payments is going to be fired after the payment has already been entered. The closest you could get would be a custom PHP action that effectively "undoes" the payment if you can verify that it was a duplicate PayPal notification. Not elegant by any stretch, but it should work.

Coal. It keeps the lights on. (Seen on any number of billboards while driving through West Virginia. Eye-wink )

IT Guy 3000's picture
Offline
Joined: 05/11/2009
Juice: 121
Re: Re: You're not kidding The

OK, thanks Ryan. I'll see what we can do in the short-term. And I'll save up my newbie questions for the upgrade to Drupal 6.x and Ubercart 2.x Smiling

I'm keeping notes as I hope to be able to contribute to some documentation for folks like me -- not a hard-core coder, but not a neophyte, either. I'm not sure what that makes me/us. Perhaps I'll come up with a descriptive name...

Another coal slogan: "Coal: Party like it's 1899!" Eye-wink