Closed globatum closed 7 years ago
@globatum Can you please provide us an email for communication? Feel free to contact ashu140510@gmail.com , sunnyrajrathod@gmail.com
If you do:
dd($response);
You will most likely see that its working but would strongly suggest changing the response processing to something like:
` if ($response != null) { if($response->getMessages()->getResultCode()) { $tresponse = $response->getTransactionResponse();
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";
}`
The following example is much cleaner than the one on the main readme:
Thank you @daniel-farina for your input. @globatum please reply if you were able to get this working or have further issues. We are closing the issue if you don't have further comments.
I am using laravel 5.2 and I cannot run any of the example codes because of the above error. It looks like nothing else is giving errors except when I get to
if (($response != null) && ($response->getMessages()->getResultCode() == "Ok") ) { echo "Succesfully create customer profile : " . $response->getCustomerProfileId() . "\n"; $paymentProfiles = $response->getCustomerPaymentProfileIdList(); echo "SUCCESS: PAYMENT PROFILE ID : " . $paymentProfiles[0] . "\n"; }
`public function createProfile($cardnum, $mm, $yy, $cvc, $email){