cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Migrating to last SDK

Hi! I have a working Authorize.net integration at vibrant.tv, based on the old SDK. I am working on migrating to the latest (sdk-php-1.8.8) and I am blocked with one particular command.

My code is based on the sample provided via GitHUB, and all is well until I reach this command:

        $controller = new AnetController\ARBCreateSubscriptionController($request);

I debugged the script, and all variables are filled correctly. But calling the above line results in a PHP fatal error (Yeah, the infamous white screen). No entries in error logs, no errors shown (I have the PHP error le vel set to maximum) and have no idea what to do next.

Any hints are greatly appreciated!!

Denes

Like a fine wine... Good from the start and getting better over time.
webgobe60
Member
1 REPLY 1

BTW, you can test it there: http://theaxesgroup.com/subscribe/

Use for testing the 4111111111111111 credit card number, and a valid e-mail.

The site is Joomla based, and the integration does couple of things, like registering a new Joomla user, capturing a subscription and sending it to Authorize.net, adding the new user to a mailing list. There are couple of debug messages, here is a sample:

Warning: Missing argument 2 for JMenuSite::getItems(), called in /home/theaxesgroup/public_html/plugins/system/wordpress/wordpress.php on line 33 and defined in /home/theaxesgroup/public_html/libraries/cms/menu/site.php on line 130

Notice: Undefined variable: attributes in /home/theaxesgroup/public_html/libraries/cms/menu/site.php on line 132

Notice: Undefined variable: values in /home/theaxesgroup/public_html/libraries/cms/menu/site.php on line 133
A new user. Calling the user model to register it to the site.
net\authorize\api\contract\v1\ARBCreateSubscriptionRequest Object ( [subscription:net\authorize\api\contract\v1\ARBCreateSubscriptionRequest:private] => net\authorize\api\contract\v1\ARBSubscriptionType Object ( [name:net\authorize\api\contract\v1\ARBSubscriptionType:private] => Monthly plan [paymentSchedule:net\authorize\api\contract\v1\ARBSubscriptionType:private] => net\authorize\api\contract\v1\PaymentScheduleType Object ( [interval:net\authorize\api\contract\v1\PaymentScheduleType:private] => net\authorize\api\contract\v1\PaymentScheduleType\IntervalAType Object ( [length:net\authorize\api\contract\v1\PaymentScheduleType\IntervalAType:private] => 1 [unit:net\authorize\api\contract\v1\PaymentScheduleType\IntervalAType:private] => months ) [startDate:net\authorize\api\contract\v1\PaymentScheduleType:private] => DateTime Object ( [date] => 2016-06-14 00:00:00.000000 [timezone_type] => 3 [timezone] => UTC ) [totalOccurrences:net\authorize\api\contract\v1\PaymentScheduleType:private] => 9999 [trialOccurrences:net\authorize\api\contract\v1\PaymentScheduleType:private] => 0 ) [amount:net\authorize\api\contract\v1\ARBSubscriptionType:private] => 1.99 [trialAmount:net\authorize\api\contract\v1\ARBSubscriptionType:private] => 0 [payment:net\authorize\api\contract\v1\ARBSubscriptionType:private] => net\authorize\api\contract\v1\PaymentType Object ( [creditCard:net\authorize\api\contract\v1\PaymentType:private] => net\authorize\api\contract\v1\CreditCardType Object ( [cardCode:net\authorize\api\contract\v1\CreditCardType:private] => [isPaymentToken:net\authorize\api\contract\v1\CreditCardType:private] => [cryptogram:net\authorize\api\contract\v1\CreditCardType:private] => [cardNumber:net\authorize\api\contract\v1\CreditCardSimpleType:private] => 4111111111111111 [expirationDate:net\authorize\api\contract\v1\CreditCardSimpleType:private] => 2022-11 ) [bankAccount:net\authorize\api\contract\v1\PaymentType:private] => [trackData:net\authorize\api\contract\v1\PaymentType:private] => [encryptedTrackData:net\authorize\api\contract\v1\PaymentType:private] => [payPal:net\authorize\api\contract\v1\PaymentType:private] => [opaqueData:net\authorize\api\contract\v1\PaymentType:private] => ) [order:net\authorize\api\contract\v1\ARBSubscriptionType:private] => [customer:net\authorize\api\contract\v1\ARBSubscriptionType:private] => [billTo:net\authorize\api\contract\v1\ARBSubscriptionType:private] => net\authorize\api\contract\v1\NameAndAddressType Object ( [firstName:net\authorize\api\contract\v1\NameAndAddressType:private] => aaa [lastName:net\authorize\api\contract\v1\NameAndAddressType:private] => bbb [company:net\authorize\api\contract\v1\NameAndAddressType:private] => [address:net\authorize\api\contract\v1\NameAndAddressType:private] => aaa [city:net\authorize\api\contract\v1\NameAndAddressType:private] => aaa [state:net\authorize\api\contract\v1\NameAndAddressType:private] => aa [zip:net\authorize\api\contract\v1\NameAndAddressType:private] => 111 [country:net\authorize\api\contract\v1\NameAndAddressType:private] => aa ) [shipTo:net\authorize\api\contract\v1\ARBSubscriptionType:private] => [profile:net\authorize\api\contract\v1\ARBSubscriptionType:private] => ) [merchantAuthentication:net\authorize\api\contract\v1\ANetApiRequestType:private] => net\authorize\api\contract\v1\MerchantAuthenticationType Object ( [name:net\authorize\api\contract\v1\MerchantAuthenticationType:private] => 8x3CwBJ6L6z [transactionKey:net\authorize\api\contract\v1\MerchantAuthenticationType:private] => 6U78rms6K82MJ6yN [sessionToken:net\authorize\api\contract\v1\MerchantAuthenticationType:private] => [password:net\authorize\api\contract\v1\MerchantAuthenticationType:private] => [impersonationAuthentication:net\authorize\api\contract\v1\MerchantAuthenticationType:private] => [fingerPrint:net\authorize\api\contract\v1\MerchantAuthenticationType:private] => [mobileDeviceId:net\authorize\api\contract\v1\MerchantAuthenticationType:private] => ) [refId:net\authorize\api\contract\v1\ANetApiRequestType:private] => ref1464711595 )
Create the subscription controller 

The part after "

Calling the user model to register it to the site.

is the content of the $request, the last line is coming from this code:

		if(JDEBUG) echo "<br>Create the subscription controller ";    
		$controller = new AnetController\ARBCreateSubscriptionController($request);

The debug message is displayed, then the disaster strikes.

Like a fine wine... Good from the start and getting better over time.
webgobe60
Member