Code: Select all
string postToProtx = GenerateProtxPostFor3DSecure(MD, PaRes);
string protxResponce = SendPostFor3DSecureCheckToProtx(service_3dSecure, postToProtx);
Dictionary<string, string> protxInformation = ParseResponse(protxResponce);
if (HasTransactionBeenAccepted(protxInformation["Status"]))
{
if (HasTransactionBeenAccepted(protxInformation["3DSecureStatus"]))
{
order.Payments[0].PaymentStatus = PaymentStatus.Captured;
order.Save();
return true;
}else{
/* if we get here it means the transaction was marked as 'INVALID' but that doesn't actually mean it's failed */
order.Payments[0].PaymentStatus = PaymentStatus.Captured;
order.Save();
return true;
}
}
else
{
order.Payments[0].PaymentStatus = PaymentStatus.CaptureFailed;
order.Save(true, true);
return false;
}
Ultimately I think the payment is being marked as finished, when it hasn't quite finished, and what I'd like to do is stop this happening or simply reverse the process. Hope that makes sense, any pointers would be greatly appreciated! If you'd like any more code or information I'll do my best.