<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic E00007 error but verifed API login and Transaction Key are correct. in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/E00007-error-but-verifed-API-login-and-Transaction-Key-are/m-p/70428#M43245</link>
    <description>&lt;P&gt;Can someone please help me figure out why I am getting E00007 based on this code.&lt;/P&gt;&lt;P&gt;If you need aditional files, I can provide the code as I am new to this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am switching over from SANDBOX to PRODUCTION.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV align="right"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Authorize.php &lt;/SPAN&gt;&lt;SPAN&gt;( C++ source, ASCII text ) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&amp;lt;?php

require(dirname(__FILE__) . '/Authorize/vendor/autoload.php');

use net\authorize\api\contract\v1 as AnetAPI;

use net\authorize\api\controller as AnetController;

define("AUTHORIZENET_LOG_FILE", "phplog");



class Authorize {

  

   function authorizeCreditCard($options){ 

	    

		

		$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();  

		$merchantAuthentication-&amp;gt;setName($options['merchant_login_id']);

		$merchantAuthentication-&amp;gt;setTransactionKey($options['merchant_transaction_key']); 

	   

		$refId = 'ref' . time();

		

		$creditCard = new AnetAPI\CreditCardType();

		$creditCard-&amp;gt;setCardNumber($options['card_number']);

		$creditCard-&amp;gt;setExpirationDate($options['expiry_year'].'-'.$options['expiry_month']);

		$creditCard-&amp;gt;setCardCode($options['card_code']);    

	   

		$paymentOne = new AnetAPI\PaymentType();

		$paymentOne-&amp;gt;setCreditCard($creditCard);    

	   

		$order = new AnetAPI\OrderType();

		$order-&amp;gt;setInvoiceNumber($options['invoice_number']);

		$order-&amp;gt;setDescription($options['description']);

	   

		$customerAddress = new AnetAPI\CustomerAddressType();

		$customerAddress-&amp;gt;setFirstName($options['first_name']);

		$customerAddress-&amp;gt;setLastName($options['last_name']);   

		$customerAddress-&amp;gt;setAddress($options['address']);

		$customerAddress-&amp;gt;setCity($options['city']);

		$customerAddress-&amp;gt;setState($options['state']);

		$customerAddress-&amp;gt;setZip($options['zip_code']);

		$customerAddress-&amp;gt;setCountry($options['country']);

	

		// Set the customer's identifying information

		$customerData = new AnetAPI\CustomerDataType();

		$customerData-&amp;gt;setType("individual"); 

		$customerData-&amp;gt;setId($options['cust_id']);

		$customerData-&amp;gt;setEmail($options['email']);   

	

		

		  

		// Create a TransactionRequestType object and add the previous objects to it

		$transactionRequestType = new AnetAPI\TransactionRequestType();

		$transactionRequestType-&amp;gt;setTransactionType("authCaptureTransaction");  

		$transactionRequestType-&amp;gt;setAmount($options['amount']);

		$transactionRequestType-&amp;gt;setOrder($order);

		$transactionRequestType-&amp;gt;setPayment($paymentOne);

		$transactionRequestType-&amp;gt;setBillTo($customerAddress);

		$transactionRequestType-&amp;gt;setCustomer($customerData);

		//$transactionRequestType-&amp;gt;addToTransactionSettings($duplicateWindowSetting);		

	   

		$request = new AnetAPI\CreateTransactionRequest();

		$request-&amp;gt;setMerchantAuthentication($merchantAuthentication);

		$request-&amp;gt;setRefId($refId);

		$request-&amp;gt;setTransactionRequest($transactionRequestType);		

		$controller = new AnetController\CreateTransactionController($request);

		$response = $controller-&amp;gt;executeWithApiResponse(\net\authorize\api\constants\ANetEnvironment::PRODUCTION);

				 

				   

		return $response;

	}   

	

   function createSubscription($options){   

    	

	$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();

    $merchantAuthentication-&amp;gt;setName($options['merchant_login_id']);

	$merchantAuthentication-&amp;gt;setTransactionKey($options['merchant_transaction_key']);  

   

    $refId = 'ref' . time();

   

    $subscription = new AnetAPI\ARBSubscriptionType();

    $subscription-&amp;gt;setName($options['subscription_name']);



    $interval = new AnetAPI\PaymentScheduleType\IntervalAType();

    $interval-&amp;gt;setLength($options['interval']);

    $interval-&amp;gt;setUnit($options['unit']);



    $paymentSchedule = new AnetAPI\PaymentScheduleType();

    $paymentSchedule-&amp;gt;setInterval($interval);

    $paymentSchedule-&amp;gt;setStartDate(new DateTime($options['start_date']));

    $paymentSchedule-&amp;gt;setTotalOccurrences("120");

    $paymentSchedule-&amp;gt;setTrialOccurrences("1");



    $subscription-&amp;gt;setPaymentSchedule($paymentSchedule);

    $subscription-&amp;gt;setAmount($options['amount']);

    $subscription-&amp;gt;setTrialAmount($options['trial_amount']);

    

    $creditCard = new AnetAPI\CreditCardType();   

	$creditCard-&amp;gt;setCardNumber($options['card_number']);

	$creditCard-&amp;gt;setExpirationDate($options['expiry_year'].'-'.$options['expiry_month']);

	$creditCard-&amp;gt;setCardCode($options['card_code']);   

		



    $payment = new AnetAPI\PaymentType();

    $payment-&amp;gt;setCreditCard($creditCard);

    $subscription-&amp;gt;setPayment($payment);



    $order = new AnetAPI\OrderType();

    $order-&amp;gt;setInvoiceNumber($options['invoice_number']);        

    $order-&amp;gt;setDescription($options['description']); 

    $subscription-&amp;gt;setOrder($order); 

    

	$billTo = new AnetAPI\NameAndAddressType();

	$billTo-&amp;gt;setFirstName($options['first_name']);

	$billTo-&amp;gt;setLastName($options['last_name']);   

	$billTo-&amp;gt;setAddress($options['address']);

	$billTo-&amp;gt;setCity($options['city']);	

	$billTo-&amp;gt;setState($options['state']);	

	$billTo-&amp;gt;setZip($options['zip_code']);

	$billTo-&amp;gt;setCountry($options['country']);	



    $subscription-&amp;gt;setBillTo($billTo);



    $request = new AnetAPI\ARBCreateSubscriptionRequest();

    $request-&amp;gt;setmerchantAuthentication($merchantAuthentication);

    $request-&amp;gt;setRefId($refId);

    $request-&amp;gt;setSubscription($subscription);

    $controller = new AnetController\ARBCreateSubscriptionController($request);



    $response = $controller-&amp;gt;executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::PRODUCTION);   

   



    return $response;

  } 

  

   function renewalSubscription($options) {

   

    $merchantAuthentication = new AnetAPI\MerchantAuthenticationType();

    $merchantAuthentication-&amp;gt;setName($options['merchant_login_id']);

	$merchantAuthentication-&amp;gt;setTransactionKey($options['merchant_transaction_key']);  

	   

    $refId = 'ref' . time();	

   

    $subscription = new AnetAPI\ARBSubscriptionType();

    $subscription-&amp;gt;setName($options['subscription_name']);



    $interval = new AnetAPI\PaymentScheduleType\IntervalAType();

    $interval-&amp;gt;setLength($options['interval']);

    $interval-&amp;gt;setUnit($options['unit']);



    $paymentSchedule = new AnetAPI\PaymentScheduleType();

    $paymentSchedule-&amp;gt;setInterval($interval);

    $paymentSchedule-&amp;gt;setStartDate(new DateTime($options['start_date']));

    $paymentSchedule-&amp;gt;setTotalOccurrences("120");

    $paymentSchedule-&amp;gt;setTrialOccurrences("1");



    $subscription-&amp;gt;setPaymentSchedule($paymentSchedule);

    $subscription-&amp;gt;setAmount($options['amount']);

    $subscription-&amp;gt;setTrialAmount($options['trial_amount']);

    

    $profile = new AnetAPI\CustomerProfileIdType();

    $profile-&amp;gt;setCustomerProfileId($options['customer_profileid']);

    $profile-&amp;gt;setCustomerPaymentProfileId($options['customer_payment_profileid']);

    $subscription-&amp;gt;setProfile($profile);	   



    $request = new AnetAPI\ARBCreateSubscriptionRequest();

    $request-&amp;gt;setmerchantAuthentication($merchantAuthentication);

    $request-&amp;gt;setRefId($refId);

    $request-&amp;gt;setSubscription($subscription);

    $controller = new AnetController\ARBCreateSubscriptionController($request);

    $response = $controller-&amp;gt;executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::PRODUCTION); 



    return $response;

  }

  

  

   function updateCreditCard($options){    

	

	$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();

    $merchantAuthentication-&amp;gt;setName($options['merchant_login_id']);

	$merchantAuthentication-&amp;gt;setTransactionKey($options['merchant_transaction_key']);      

   

    $refId = 'ref' . time();



    $subscription = new AnetAPI\ARBSubscriptionType();



    $creditCard = new AnetAPI\CreditCardType();   

	$creditCard-&amp;gt;setCardNumber($options['card_number']);

	$creditCard-&amp;gt;setExpirationDate($options['expiry_year'].'-'.$options['expiry_month']);

	$creditCard-&amp;gt;setCardCode($options['cvv']);   



    $payment = new AnetAPI\PaymentType();

    $payment-&amp;gt;setCreditCard($creditCard);    



    $subscription-&amp;gt;setPayment($payment);

       

    $request = new AnetAPI\ARBUpdateSubscriptionRequest();

    $request-&amp;gt;setMerchantAuthentication($merchantAuthentication);

    $request-&amp;gt;setRefId($refId);

    $request-&amp;gt;setSubscriptionId($options['subscriptionid']);

    $request-&amp;gt;setSubscription($subscription);



    $controller = new AnetController\ARBUpdateSubscriptionController($request);

    $response = $controller-&amp;gt;executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::PRODUCTION);    



    return $response;

   

   

   }

   

   function updateSubscription($options){    

	

	$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();

    $merchantAuthentication-&amp;gt;setName($options['merchant_login_id']);

	$merchantAuthentication-&amp;gt;setTransactionKey($options['merchant_transaction_key']);      

   

    $refId = 'ref' . time();	



    $subscription = new AnetAPI\ARBSubscriptionType();

    $subscription-&amp;gt;setName($options['subscription_name']);

    $subscription-&amp;gt;setAmount($options['amount']); 

	

	$order = new AnetAPI\OrderType();          

    $order-&amp;gt;setDescription($options['description']); 

    $subscription-&amp;gt;setOrder($order); 

	  

		 

	$profile = new AnetAPI\CustomerProfileIdType();

    $profile-&amp;gt;setCustomerProfileId($options['customer_profileid']);

    $profile-&amp;gt;setCustomerPaymentProfileId($options['customer_payment_profileid']);

    $subscription-&amp;gt;setProfile($profile);	    

   

    $request = new AnetAPI\ARBUpdateSubscriptionRequest();

    $request-&amp;gt;setMerchantAuthentication($merchantAuthentication);

    $request-&amp;gt;setRefId($refId);

    $request-&amp;gt;setSubscriptionId($options['subscriptionid']);

    $request-&amp;gt;setSubscription($subscription);



    $controller = new AnetController\ARBUpdateSubscriptionController($request);

    $response = $controller-&amp;gt;executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::PRODUCTION);   



    return $response;   

   

   }

   

   function cancelSubscription($options){   

	

	$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();

    $merchantAuthentication-&amp;gt;setName($options['merchant_login_id']);

	$merchantAuthentication-&amp;gt;setTransactionKey($options['merchant_transaction_key']);   

       

    $refId = 'ref' . time();



    $request = new AnetAPI\ARBCancelSubscriptionRequest();

    $request-&amp;gt;setMerchantAuthentication($merchantAuthentication);

    $request-&amp;gt;setRefId($refId);

    $request-&amp;gt;setSubscriptionId($options['subscriptionid']);

    $controller = new AnetController\ARBCancelSubscriptionController($request);

    $response = $controller-&amp;gt;executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::PRODUCTION);    



    return $response;



  }    



}&lt;/PRE&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 23 Jan 2020 04:05:13 GMT</pubDate>
    <dc:creator>jstrick79</dc:creator>
    <dc:date>2020-01-23T04:05:13Z</dc:date>
    <item>
      <title>E00007 error but verifed API login and Transaction Key are correct.</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/E00007-error-but-verifed-API-login-and-Transaction-Key-are/m-p/70428#M43245</link>
      <description>&lt;P&gt;Can someone please help me figure out why I am getting E00007 based on this code.&lt;/P&gt;&lt;P&gt;If you need aditional files, I can provide the code as I am new to this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am switching over from SANDBOX to PRODUCTION.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV align="right"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Authorize.php &lt;/SPAN&gt;&lt;SPAN&gt;( C++ source, ASCII text ) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&amp;lt;?php

require(dirname(__FILE__) . '/Authorize/vendor/autoload.php');

use net\authorize\api\contract\v1 as AnetAPI;

use net\authorize\api\controller as AnetController;

define("AUTHORIZENET_LOG_FILE", "phplog");



class Authorize {

  

   function authorizeCreditCard($options){ 

	    

		

		$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();  

		$merchantAuthentication-&amp;gt;setName($options['merchant_login_id']);

		$merchantAuthentication-&amp;gt;setTransactionKey($options['merchant_transaction_key']); 

	   

		$refId = 'ref' . time();

		

		$creditCard = new AnetAPI\CreditCardType();

		$creditCard-&amp;gt;setCardNumber($options['card_number']);

		$creditCard-&amp;gt;setExpirationDate($options['expiry_year'].'-'.$options['expiry_month']);

		$creditCard-&amp;gt;setCardCode($options['card_code']);    

	   

		$paymentOne = new AnetAPI\PaymentType();

		$paymentOne-&amp;gt;setCreditCard($creditCard);    

	   

		$order = new AnetAPI\OrderType();

		$order-&amp;gt;setInvoiceNumber($options['invoice_number']);

		$order-&amp;gt;setDescription($options['description']);

	   

		$customerAddress = new AnetAPI\CustomerAddressType();

		$customerAddress-&amp;gt;setFirstName($options['first_name']);

		$customerAddress-&amp;gt;setLastName($options['last_name']);   

		$customerAddress-&amp;gt;setAddress($options['address']);

		$customerAddress-&amp;gt;setCity($options['city']);

		$customerAddress-&amp;gt;setState($options['state']);

		$customerAddress-&amp;gt;setZip($options['zip_code']);

		$customerAddress-&amp;gt;setCountry($options['country']);

	

		// Set the customer's identifying information

		$customerData = new AnetAPI\CustomerDataType();

		$customerData-&amp;gt;setType("individual"); 

		$customerData-&amp;gt;setId($options['cust_id']);

		$customerData-&amp;gt;setEmail($options['email']);   

	

		

		  

		// Create a TransactionRequestType object and add the previous objects to it

		$transactionRequestType = new AnetAPI\TransactionRequestType();

		$transactionRequestType-&amp;gt;setTransactionType("authCaptureTransaction");  

		$transactionRequestType-&amp;gt;setAmount($options['amount']);

		$transactionRequestType-&amp;gt;setOrder($order);

		$transactionRequestType-&amp;gt;setPayment($paymentOne);

		$transactionRequestType-&amp;gt;setBillTo($customerAddress);

		$transactionRequestType-&amp;gt;setCustomer($customerData);

		//$transactionRequestType-&amp;gt;addToTransactionSettings($duplicateWindowSetting);		

	   

		$request = new AnetAPI\CreateTransactionRequest();

		$request-&amp;gt;setMerchantAuthentication($merchantAuthentication);

		$request-&amp;gt;setRefId($refId);

		$request-&amp;gt;setTransactionRequest($transactionRequestType);		

		$controller = new AnetController\CreateTransactionController($request);

		$response = $controller-&amp;gt;executeWithApiResponse(\net\authorize\api\constants\ANetEnvironment::PRODUCTION);

				 

				   

		return $response;

	}   

	

   function createSubscription($options){   

    	

	$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();

    $merchantAuthentication-&amp;gt;setName($options['merchant_login_id']);

	$merchantAuthentication-&amp;gt;setTransactionKey($options['merchant_transaction_key']);  

   

    $refId = 'ref' . time();

   

    $subscription = new AnetAPI\ARBSubscriptionType();

    $subscription-&amp;gt;setName($options['subscription_name']);



    $interval = new AnetAPI\PaymentScheduleType\IntervalAType();

    $interval-&amp;gt;setLength($options['interval']);

    $interval-&amp;gt;setUnit($options['unit']);



    $paymentSchedule = new AnetAPI\PaymentScheduleType();

    $paymentSchedule-&amp;gt;setInterval($interval);

    $paymentSchedule-&amp;gt;setStartDate(new DateTime($options['start_date']));

    $paymentSchedule-&amp;gt;setTotalOccurrences("120");

    $paymentSchedule-&amp;gt;setTrialOccurrences("1");



    $subscription-&amp;gt;setPaymentSchedule($paymentSchedule);

    $subscription-&amp;gt;setAmount($options['amount']);

    $subscription-&amp;gt;setTrialAmount($options['trial_amount']);

    

    $creditCard = new AnetAPI\CreditCardType();   

	$creditCard-&amp;gt;setCardNumber($options['card_number']);

	$creditCard-&amp;gt;setExpirationDate($options['expiry_year'].'-'.$options['expiry_month']);

	$creditCard-&amp;gt;setCardCode($options['card_code']);   

		



    $payment = new AnetAPI\PaymentType();

    $payment-&amp;gt;setCreditCard($creditCard);

    $subscription-&amp;gt;setPayment($payment);



    $order = new AnetAPI\OrderType();

    $order-&amp;gt;setInvoiceNumber($options['invoice_number']);        

    $order-&amp;gt;setDescription($options['description']); 

    $subscription-&amp;gt;setOrder($order); 

    

	$billTo = new AnetAPI\NameAndAddressType();

	$billTo-&amp;gt;setFirstName($options['first_name']);

	$billTo-&amp;gt;setLastName($options['last_name']);   

	$billTo-&amp;gt;setAddress($options['address']);

	$billTo-&amp;gt;setCity($options['city']);	

	$billTo-&amp;gt;setState($options['state']);	

	$billTo-&amp;gt;setZip($options['zip_code']);

	$billTo-&amp;gt;setCountry($options['country']);	



    $subscription-&amp;gt;setBillTo($billTo);



    $request = new AnetAPI\ARBCreateSubscriptionRequest();

    $request-&amp;gt;setmerchantAuthentication($merchantAuthentication);

    $request-&amp;gt;setRefId($refId);

    $request-&amp;gt;setSubscription($subscription);

    $controller = new AnetController\ARBCreateSubscriptionController($request);



    $response = $controller-&amp;gt;executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::PRODUCTION);   

   



    return $response;

  } 

  

   function renewalSubscription($options) {

   

    $merchantAuthentication = new AnetAPI\MerchantAuthenticationType();

    $merchantAuthentication-&amp;gt;setName($options['merchant_login_id']);

	$merchantAuthentication-&amp;gt;setTransactionKey($options['merchant_transaction_key']);  

	   

    $refId = 'ref' . time();	

   

    $subscription = new AnetAPI\ARBSubscriptionType();

    $subscription-&amp;gt;setName($options['subscription_name']);



    $interval = new AnetAPI\PaymentScheduleType\IntervalAType();

    $interval-&amp;gt;setLength($options['interval']);

    $interval-&amp;gt;setUnit($options['unit']);



    $paymentSchedule = new AnetAPI\PaymentScheduleType();

    $paymentSchedule-&amp;gt;setInterval($interval);

    $paymentSchedule-&amp;gt;setStartDate(new DateTime($options['start_date']));

    $paymentSchedule-&amp;gt;setTotalOccurrences("120");

    $paymentSchedule-&amp;gt;setTrialOccurrences("1");



    $subscription-&amp;gt;setPaymentSchedule($paymentSchedule);

    $subscription-&amp;gt;setAmount($options['amount']);

    $subscription-&amp;gt;setTrialAmount($options['trial_amount']);

    

    $profile = new AnetAPI\CustomerProfileIdType();

    $profile-&amp;gt;setCustomerProfileId($options['customer_profileid']);

    $profile-&amp;gt;setCustomerPaymentProfileId($options['customer_payment_profileid']);

    $subscription-&amp;gt;setProfile($profile);	   



    $request = new AnetAPI\ARBCreateSubscriptionRequest();

    $request-&amp;gt;setmerchantAuthentication($merchantAuthentication);

    $request-&amp;gt;setRefId($refId);

    $request-&amp;gt;setSubscription($subscription);

    $controller = new AnetController\ARBCreateSubscriptionController($request);

    $response = $controller-&amp;gt;executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::PRODUCTION); 



    return $response;

  }

  

  

   function updateCreditCard($options){    

	

	$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();

    $merchantAuthentication-&amp;gt;setName($options['merchant_login_id']);

	$merchantAuthentication-&amp;gt;setTransactionKey($options['merchant_transaction_key']);      

   

    $refId = 'ref' . time();



    $subscription = new AnetAPI\ARBSubscriptionType();



    $creditCard = new AnetAPI\CreditCardType();   

	$creditCard-&amp;gt;setCardNumber($options['card_number']);

	$creditCard-&amp;gt;setExpirationDate($options['expiry_year'].'-'.$options['expiry_month']);

	$creditCard-&amp;gt;setCardCode($options['cvv']);   



    $payment = new AnetAPI\PaymentType();

    $payment-&amp;gt;setCreditCard($creditCard);    



    $subscription-&amp;gt;setPayment($payment);

       

    $request = new AnetAPI\ARBUpdateSubscriptionRequest();

    $request-&amp;gt;setMerchantAuthentication($merchantAuthentication);

    $request-&amp;gt;setRefId($refId);

    $request-&amp;gt;setSubscriptionId($options['subscriptionid']);

    $request-&amp;gt;setSubscription($subscription);



    $controller = new AnetController\ARBUpdateSubscriptionController($request);

    $response = $controller-&amp;gt;executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::PRODUCTION);    



    return $response;

   

   

   }

   

   function updateSubscription($options){    

	

	$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();

    $merchantAuthentication-&amp;gt;setName($options['merchant_login_id']);

	$merchantAuthentication-&amp;gt;setTransactionKey($options['merchant_transaction_key']);      

   

    $refId = 'ref' . time();	



    $subscription = new AnetAPI\ARBSubscriptionType();

    $subscription-&amp;gt;setName($options['subscription_name']);

    $subscription-&amp;gt;setAmount($options['amount']); 

	

	$order = new AnetAPI\OrderType();          

    $order-&amp;gt;setDescription($options['description']); 

    $subscription-&amp;gt;setOrder($order); 

	  

		 

	$profile = new AnetAPI\CustomerProfileIdType();

    $profile-&amp;gt;setCustomerProfileId($options['customer_profileid']);

    $profile-&amp;gt;setCustomerPaymentProfileId($options['customer_payment_profileid']);

    $subscription-&amp;gt;setProfile($profile);	    

   

    $request = new AnetAPI\ARBUpdateSubscriptionRequest();

    $request-&amp;gt;setMerchantAuthentication($merchantAuthentication);

    $request-&amp;gt;setRefId($refId);

    $request-&amp;gt;setSubscriptionId($options['subscriptionid']);

    $request-&amp;gt;setSubscription($subscription);



    $controller = new AnetController\ARBUpdateSubscriptionController($request);

    $response = $controller-&amp;gt;executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::PRODUCTION);   



    return $response;   

   

   }

   

   function cancelSubscription($options){   

	

	$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();

    $merchantAuthentication-&amp;gt;setName($options['merchant_login_id']);

	$merchantAuthentication-&amp;gt;setTransactionKey($options['merchant_transaction_key']);   

       

    $refId = 'ref' . time();



    $request = new AnetAPI\ARBCancelSubscriptionRequest();

    $request-&amp;gt;setMerchantAuthentication($merchantAuthentication);

    $request-&amp;gt;setRefId($refId);

    $request-&amp;gt;setSubscriptionId($options['subscriptionid']);

    $controller = new AnetController\ARBCancelSubscriptionController($request);

    $response = $controller-&amp;gt;executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::PRODUCTION);    



    return $response;



  }    



}&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 23 Jan 2020 04:05:13 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/E00007-error-but-verifed-API-login-and-Transaction-Key-are/m-p/70428#M43245</guid>
      <dc:creator>jstrick79</dc:creator>
      <dc:date>2020-01-23T04:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: E00007 error but verifed API login and Transaction Key are correct.</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/E00007-error-but-verifed-API-login-and-Transaction-Key-are/m-p/70434#M43250</link>
      <description>&lt;P&gt;I fxied it by requesting a new transaction key.&amp;nbsp; No additional code changes took place.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2020 15:06:07 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/E00007-error-but-verifed-API-login-and-Transaction-Key-are/m-p/70434#M43250</guid>
      <dc:creator>jstrick79</dc:creator>
      <dc:date>2020-01-23T15:06:07Z</dc:date>
    </item>
  </channel>
</rss>

