Today my client had a customer that didn't manage to complete a order. The order didn't seem to be finalized and still of stage "CART". In the checkout the customer had chosen PayPal as payment method and for the payment amount it was still 0.00 DKK.
However later my client did successfully complete an order with PayPal as payment method.
In the log this error has been written.
2015-03-31 17:53:14,887 [14] ERROR TeaCommerce.Umbraco.Configuration.Infrastructure.Logging.LoggingProvider - [Thread 375] PayPal(CART-3070) - Process callback - Exception: System.Net.WebException: The remote server returned an error: (503) Server Unavailable.
at System.Net.HttpWebRequest.GetResponse()
at TeaCommerce.Api.Web.PaymentProviders.APaymentProvider.MakePostRequest(String url, String request, NetworkCredential credentials)
at TeaCommerce.PaymentProviders.Classic.PayPal.ProcessCallback(Order order, HttpRequest request, IDictionary`2 settings)
System.Net.WebException: The remote server returned an error: (503) Server Unavailable.
at System.Net.HttpWebRequest.GetResponse()
at TeaCommerce.Api.Web.PaymentProviders.APaymentProvider.MakePostRequest(String url, String request, NetworkCredential credentials)
at TeaCommerce.PaymentProviders.Classic.PayPal.ProcessCallback(Order order, HttpRequest request, IDictionary`2 settings)
So it seems that at that moment PayPal's service wasn't available? .. and I think the customer was returned teh the "cancel" page. But it there a way to handle different errors, because if the customer choose the cancel the payment from PayPal or a error occurs (like in this case) the customer will be send to the same cancel page, right?
Can we somehow display a more specific "cancel" page, e.g. whether the customer had cancelled the payment or some other error occurs during the payment?
So I could add another property if I want, where the cancel_return in #L31 and #L68 specify where to redirect both when an error occurs or the customer cancel the payment.
Handle error when payment service not available
Today my client had a customer that didn't manage to complete a order. The order didn't seem to be finalized and still of stage "CART". In the checkout the customer had chosen PayPal as payment method and for the payment amount it was still 0.00 DKK.
However later my client did successfully complete an order with PayPal as payment method.
In the log this error has been written.
So it seems that at that moment PayPal's service wasn't available? .. and I think the customer was returned teh the "cancel" page. But it there a way to handle different errors, because if the customer choose the cancel the payment from PayPal or a error occurs (like in this case) the customer will be send to the same cancel page, right?
Can we somehow display a more specific "cancel" page, e.g. whether the customer had cancelled the payment or some other error occurs during the payment?
/Bjarne
Hi Bjarne
You can extend the provider and see if there is any extra info available that you can get and save for the order.
Hi Anders
Okay, I guess it reached this line:
https://github.com/TeaCommerce/Payment-providers/blob/master/Source/TeaCommerce.PaymentProviders/Classic/PayPal.cs#L241
So I could add another property if I want, where the cancel_return in #L31 and #L68 specify where to redirect both when an error occurs or the customer cancel the payment.
Nope - that is when you hit cancel and approved payment, NOT when the payment is canceled in the authorize process. That is the GetCancelUrl method.
Kind regards
Anders
Okay, so GetCancelUrl is if the customer hit cancel in payment process that returns the cancel_return? https://github.com/TeaCommerce/Payment-providers/blob/master/Source/TeaCommerce.PaymentProviders/Classic/PayPal.cs#L91
In this case we had 503 - Service Unavailable: https://developer.paypal.com/docs/classic/ipn/integration-guide/HTMLStatusCodes/ , so if e.g. one 500-error occours maybe it could have another return url? In e.g. this line does it know if it is in "payment" or "cancel" (by customer) state? https://github.com/TeaCommerce/Payment-providers/blob/master/Source/TeaCommerce.PaymentProviders/Classic/PayPal.cs#L241
/Bjarne
I cant remember what status codes paypal sends or if there is any extra info. You need to test that your self :)
is working on a reply...