cancel
Showing results for 
Search instead for 
Did you mean: 

Help with erorr - CIM Transaction using PHP SDK

I am using the sample code from the CIM SDK and getting the following error


Notice: Undefined variable: request
Fatal error: Call to a member function createCustomerProfileTransaction() on a non-object


My code is as follows

// Create Auth & Capture Transaction
$transaction = new AuthorizeNetTransaction;
$transaction->amount = $cost;
$transaction->customerProfileId = $profileId;
$transaction->customerPaymentProfileId = $paymentProfileId;	

$response = $request->createCustomerProfileTransaction("AuthCapture", $transaction);
$transactionResponse = $response->getTransactionResponse();
$CIMrespCode 	= $transactionResponse->response_code;
$CIMrespReason 	= $transactionResponse->response_reason_code;
$CIMrespText 	= $transactionResponse->response_reason_text;
$CIMrespTextDB 	= sanitize($CIMrespText);
$CIMauthType 	= "AUTH_CAPTURE";
$CIMtransId = $transactionResponse->transaction_id;

if ($transactionResponse->approved) {...


What am I missing

syoung68
Contributor
1 REPLY 1

Nevermind. I am an idiot... forgot $request = new AuthorizeNetCIM;

syoung68
Contributor