returnself::errorExit(9003,'It appears that this transaction is a duplicate. Have you already submitted the form once? If so there may have been a connection problem. Check your email for a receipt. If you do not receive a receipt within 2 hours you can try your transaction again. If you continue to have problems please contact the site administrator.');
thrownewPaymentProcessorException('It appears that this transaction is a duplicate. Have you already submitted the form once? If so there may have been a connection problem. Check your email for a receipt. If you do not receive a receipt within 2 hours you can try your transaction again. If you continue to have problems please contact the site administrator.',9003);
}
// ie. url at payment processor to submit to.
...
...
@@ -259,9 +258,9 @@ class CRM_Core_Payment_PayflowPro extends CRM_Core_Payment {
/*
* Payment successfully sent to gateway - process the response now
*/
$result=strstr($responseData,"RESULT");
$result=strstr($responseData,'RESULT');
if(empty($result)){
returnself::errorExit(9016,"No RESULT code from PayPal.");
thrownewPaymentProcessorException('No RESULT code from PayPal.',9016);
}
$nvpArray=[];
...
...
@@ -312,47 +311,26 @@ class CRM_Core_Payment_PayflowPro extends CRM_Core_Payment {
return$params;
case1:
returnself::errorExit(9008,"There is a payment processor configuration problem. This is usually due to invalid account information or ip restrictions on the account. You can verify ip restriction by logging // into Manager. See Service Settings >> Allowed IP Addresses. ");
thrownewPaymentProcessorException('There is a payment processor configuration problem. This is usually due to invalid account information or ip restrictions on the account. You can verify ip restriction by logging // into Manager. See Service Settings >> Allowed IP Addresses. ',9003);
case12:
// Hard decline from bank.
returnself::errorExit(9009,"Your transaction was declined ");
thrownewPaymentProcessorException('Your transaction was declined ',9009);
case13:
// Voice authorization required.
returnself::errorExit(9010,"Your Transaction is pending. Contact Customer Service to complete your order.");
thrownewPaymentProcessorException('Your Transaction is pending. Contact Customer Service to complete your order.',9010);
case23:
// Issue with credit card number or expiration date.
returnself::errorExit(9012,"You have not configured your payment processor with the correct credentials. Make sure you have provided both the <vendor> and the <user> variables ");
thrownewPaymentProcessorException('You have not configured your payment processor with the correct credentials. Make sure you have provided both the <vendor> and the <user> variables ',9012);
default:
returnself::errorExit(9013,"Error - from payment processor: [".$result_code." ".$nvpArray['RESPMSG']."] ");
}
returnself::errorExit(9014,"Check the code - all transactions should have been headed off before they got here. Something slipped through the net");