Hi,
I am trying to integrate authorizenet payment recurrring billing with my cakePHP 3 project. Adding
Error: Class 'App\Controller\AuthorizeNet_Subscription' not found
Would you please help me to fix this?
Regards,
Jipson
-- I am trying to integrate authorizenet payment recurrring billing with my cakePHP 3 project. Adding
"require": { "authorizenet/authorizenet": "~1.8" } to the composer I installed the library file in vendor. I couldn't find any namespace declarations on the library files. I created a function on my vendor controller as below
public function authtest(){
define("AUTHORIZENET_API_LOGIN_ID", "LOGIN");
define("AUTHORIZENET_TRANSACTION_KEY", "KEY");
$subscription = new AuthorizeNet_Subscription;
$subscription->name = "PHP Monthly Magazine";
$subscription->intervalLength = "1";
$subscription->intervalUnit = "months";
$subscription->startDate = "2014-08-14";
$subscription->totalOccurrences = "12";
$subscription->amount = "12.99";
$subscription->creditCardCardNumber = "6011000000000012";
$subscription->creditCardExpirationDate= "2018-10";
$subscription->creditCardCardCode = "123";
$subscription->billToFirstName = "Rasmus";
$subscription->billToLastName = "Doe";
// Create the subscription.
$request = new AuthorizeNetARB;
$response = $request->createSubscription($subscription);
$subscription_id = $response->getSubscriptionId();
echo $subscription_id;exit;
}
When I am accessing the function ad dsite.com/vendors/authtest I get the following error.
Fatal Error
Error: Class 'App\Controller\AuthorizeNet_Subscription' not found
Would you please help me to fix this?
Regards,
Jipson
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment