Судя по форуму не у одного меня большой процент неуспешных попыток оплатить через PayPro. В попытках повысить конверсию решил выводить более детальные статусы оплат в интерфейсе своего сервиса + писать письма от себя, так как часть пользователя не очень понимает кто такой этот PayPro.
PayPro отдает описание ошибки через IPN + в отдельны случаях текст ошибки(actionReason) может дополняться уже после отправки уведомления. Проблема в том, что ошибок много и во многих случаях они совершенно непоятны для юзера.
Решил написать свои, более расширенные тексты ошибок. Может кому-то пригодится.
+ буду признателен, если укажите на неточности в моем понимании кодов ошибок.
if($actionReason=="we noticed this is a duplicate order. As you have already purchased this product recently, please confirm your intention to finalize this order too, by replying to this e-mail."){
$actionReason="The payment system has noticed a duplicate order. You have already purchased this license recently. If you intend to buy it again - please reply to the email sent to you by the payment system PayPro Global. The email was sent to the email address specified when placing the order.";
}
if($actionReason=="Lost or Stolen" OR $actionReason=="Invalid Request"){
$actionReason="Your bank has restricted transactions, this usually happens because the card has been lost or stolen. Please contact your bank. You can also try to place new order with another payment method (PayPal, Wire transfer, Crytopayment)";
}
if($actionReason=="3DS Authorization Failed" or $actionReason=='Additional customer authentication required' or $actionReason=='Authorization failed.'){
$actionReason="Your bank has rejected the transaction as it has not received the correct confirmation from you. Please make sure that you enter your bank details and confirmation code without typos. Please try to place the order again or contact the bank to clarify the reason for rejection.";
}
if($status=='Waiting' and $paymentmethod=='PayPal' and $actionReason==''){
$actionReason="The payment system is waiting for <b>YOU</b> to confirm the PayPal transfer. To do this, go to your personal PayPal account and confirm the payment.";}
if(status=='Waiting' and $paymentmethod!='PayPal' and $actionReason==''){
$actionReason="The payment system is waiting for your bank to confirm the transaction. This usually happens if you do not confirm the payment via 3DS authorization. Check that you have confirmed the payment. Also check the email you provided when placing the order. Your bank or payment platform PayPro Global may have asked you for additional confirmation to complete the order.";}
if($actionReason=="Authorization failed. Blacklisted credit card BIN authorization prevention. Reason: Automatically created record." OR $actionReason=="Authorization failed. Fraud attempt prevention, card testing." OR $actionReason=='Other Fraud - Card Absent'){
$actionReason="The payment system rejected the payment because the provided bank card details are not valid. Please check the entered data. If you are sure that you are entering valid data, please contact us or use another payment method (another card, PayPal, Crytopayment).";
}
if($actionReason=='Automatically declined after expired waiting period.' and $paymentmethod=='PayPal'){
$actionReason="The transaction was canceled because you did not confirm the transaction in your PayPal account.";}
if($actionReason=='Automatically declined after expired waiting period.' and $paymentmethod!='PayPal'){
$actionReason="The transaction was canceled because confirmation was not received from your bank. Most likely, you did not confirm the transaction using 3DS. Please replace and confirm new order or use another payment method (another card, PayPal, Crytopayment).";}
if($actionReason=='your contact / billing information is inconsistent. Please place a new order using your full real name/reachable phone number/real billing address.'){
$actionReason="Payment platform has rejected the transaction as your contact/billing information is inconsistent. Please place a new order using your full real name/reachable phone number/real billing address.";}
if($actionReason=='your PayPal payment session has expired. You are welcome to place a new order for the same product. Please note that additional confirmation may be needed.'){
$actionReason="PayPal session is expired. Please place a new order and confirm it in your personal PayPal account. Please note that additional confirmation may be needed.";}
if($actionReason=='Unfortunately, our system cannot process any orders coming from disposable/anonymizing/temporary e-mail domains. Kindly place a new order using a non-disposable email address (Gmail, Yahoo, Hotmail, etc.). Thank you.'){
$actionReason="Unfortunately, payment platform cannot process any orders coming from disposable/anonymizing/temporary e-mail domains. Kindly place a new order using a non-disposable email address (Gmail, Yahoo, Hotmail, etc.). Thank you.";}
if($actionReason=='Unfortunately, we did not succeed in confirming your order. Please provide us with your reachable phone number where our team can contact you. We will call you to confirm the details of your purchase and process it accordingly or please place a new order at a time when you are available to confirm it.'){
$actionReason="Unfortunately, payment platform did not succeed in confirming your order. Please place new order with reachable phone number where payment platform team can contact you. You may have incoming call to confirm the details of your purchase. This is need for protection from fraudulent payments. We hope for your understanding.";}
if($actionReason=='Hard Gateway Decline'){
$actionReason="The payment system rejected the payment because card is invalid, expired, or closed. Please place new order with a new payment details. Also you could use another payment method (PayPal, Wire transfer, Crytopayment)";}
if($actionReason=='Gateway Decline' or $actionReason=='Card Expired/Invalid' or $actionReason=='Gateway Error'){
$actionReason="Your bank has rejected the payment because card is invalid, expired, closed or insufficient funds. Please check bank details and place new order. Also you could use another payment method (PayPal, Wire transfer, Crytopayment)";}
if($actionReason=='Do Not Honor' or $actionReason=='Authorization failed. Not found credit card switch rules.'){
$actionReason="Your bank has declined a transaction. There are several reasons, including insufficient funds, suspected fraudulent activity, or a hold on the account due to suspicious activity or past delinquency. Please contact your bank to clarify situation or place new order with use another payment method (another card, PayPal, Crytopayment).";}
if($actionReason=='Not Sufficient Funds'){
$actionReason="Your bank has declined a transaction. This is usually due to insufficient funds on your balance. Please check your balance and place a new order.";}
if($actionReason=='Unfortunately, we did not succeed in confirming your order since we never received any confirmation from you. Please check your inbox (especially the spam/junk folder) and reply to our email.' or $actionReason=='Unfortunately, we did not succeed in confirming your order since we never received any confirmation from you. Please check your inbox (especially the spam/junk folder) and reply to our email'){
$actionReason="Payment information requested additional confirmation from you via email, but did not receive a response, so the order was canceled. Please check the email address you provided when placing the order, including SPAM folder and reply to the email from PayPro Global.";}
if($actionReason=='you requested an order cancellation. Please note that, due to standard banking procedures, your funds are likely to have been reserved by your credit card issuer (bank), with the purpose of ensuring the necessary amount for your purchase. As your order has been declined, you should expect your money to be automatically refunded within 10 business days. For further details regarding the status of your refunded amount please contact your credit card issuer (bank) directly.'){
$actionReason="You requested an order cancellation. Please note that, due to standard banking procedures, your funds are likely to have been reserved by your credit card issuer (bank), with the purpose of ensuring the necessary amount for your purchase. As your order has been declined, you should expect your money to be automatically refunded within 10 business days. For further details regarding the status of your refunded amount please contact your credit card issuer (bank) directly.";}
if (strpos($actionReason, 'In order to complete your purchase, please provide') !== false){
$actionReason="To successfully complete the transaction, the PayPro Global payment system has requested additional data from you, as the payment information you provided requires confirmation. Please check the mailbox you provided when placing your order and send the requested information. As alternative you could place a new order with another payment method (another card, PayPal, Crytopayment).";}
if (strpos($actionReason, 'Gateway: 10417') !== false){
$actionReason="PayPal authorization failed. Transaction cannot complete. Please retry the transaction using an alternative payment method from the PayPal wallet or use another payment method (bank card, Wire transfer, Crytopayment).";}
if (strpos($actionReason, 'Gateway: 10207') !== false){
$actionReason="PayPal has declined a transaction due to insufficient funds on your balance. Please check your balance and place a new order."; }
if (strpos($actionReason, 'Gateway: 10001') !== false){
$actionReason="PayPal was unable to complete the transaction. Please check your personal PayPal account, it may require confirmation, it is also worth checking your account balance. Also you could use another payment method (bank card, Wire transfer, Crytopayment).";}