Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($tresponse != null && $tresponse->getMessages() != null) {
- echo " Transaction Response code : " . $tresponse->getResponseCode() . "n";
- echo "Charge Credit Card AUTH CODE : " . $tresponse->getAuthCode() . "n";
- echo "Charge Credit Card TRANS ID : " . $tresponse->getTransId() . "n";
- echo " Code : " . $tresponse->getMessages()[0]->getCode() . "n";
- echo " Description : " . $tresponse->getMessages()[0]->getDescription() . "n";
- } else {
- echo "Transaction Failed n";
- if ($tresponse->getErrors() != null) {
- echo " Error code : " . $tresponse->getErrors()[0]->getErrorCode() . "n";
- echo " Error message : " . $tresponse->getErrors()[0]->getErrorText() . "n";
- }
- }
- } else {
- echo "Transaction Failed n";
- $tresponse = $response->getTransactionResponse();
- if ($tresponse != null && $tresponse->getErrors() != null) {
- echo " Error code : " . $tresponse->getErrors()[0]->getErrorCode() . "n";
- echo " Error message : " . $tresponse->getErrors()[0]->getErrorText() . "n";
- } else {
- echo " Error code : " . $response->getMessages()->getMessage()[0]->getCode() . "n";
- echo " Error message : " . $response->getMessages()->getMessage()[0]->getText() . "n";
- }
- }
- } else {
- echo "No response returned n";
- }
Add Comment
Please, Sign In to add comment