Getting paypal error code

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
frosty
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 32
Joined: Thu Jul 24, 2008 3:22 am

Getting paypal error code

Post by frosty » Fri Nov 07, 2008 4:45 am

on

Transaction authTx = GetLastAuthorization(lastPayment);
authTx.ResponseMessage

I get something like this,
This transaction cannot be processed. (10747)

Is there a way to just get the code "10747"

I've tried every property on Transaction. Of course i could use regEx to extract it, but it's not most elegant way to do this. Surely there is property somewhere that i am missing.

Thanks.

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

Re: Getting paypal error code

Post by mazhar » Fri Nov 07, 2008 7:09 am

Try the following property

Code: Select all

authTx.ResponseCode

frosty
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 32
Joined: Thu Jul 24, 2008 3:22 am

Re: Getting paypal error code

Post by frosty » Fri Nov 07, 2008 9:14 am

afraid not. that was the first thing i tried. That returns a string like "failure".

I've done something like this

String regex = @"\d{5}";
foreach (Match m in Regex.Matches(responseMessage, regex))
{
return (m.Value);
}

Post Reply