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.
Getting paypal error code
Re: Getting paypal error code
Try the following property
Code: Select all
authTx.ResponseCode
Re: Getting paypal error code
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);
}
I've done something like this
String regex = @"\d{5}";
foreach (Match m in Regex.Matches(responseMessage, regex))
{
return (m.Value);
}