cancel
Showing results for 
Search instead for 
Did you mean: 

Could not run sample code.....

I downloaded the SDK nad the sample code and placed them in a directory in my Apache root. In

conformance with the directive at the bottom of the git-hub page (https://github.com/AuthorizeNet/sample-code-php), I copied the autoload.php file from the sdk-php-1.8.8/ directory into the sample-code-php-master/ directory (and into the Payment Transactions directory). I then ran the command "php PaymentTransactions/charge-credit-card.php" and got the following error message:

 

PHP Warning: require(/var/www/authorize/sample-code-php-master/classmap.php): failed to open stream: No such file or directory in /var/www/authorize/sample-code-php-master/autoload.php on line 12
PHP Fatal error: require(): Failed opening required '/var/www/authorize/sample-code-php-master/classmap.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/authorize/sample-code-php-master/autoload.php on line 12

 

However, line 12 is NOT the 'require' line. Rather, it is:

I downloaded the SDK nad the sample code and placed them in a directory in my Apache root. In

conformance with the directive at the bottom of the git-hub page (https://github.com/AuthorizeNet/sample-code-php), I copied the autoload.php file from the sdk-php-1.8.8/ directory into the sample-code-php-master/ directory (and into the Payment Transactions directory). I then ran the command "php PaymentTransactions/charge-credit-card.php" and got the following error message:

 

PHP Warning: require(/var/www/authorize/sample-code-php-master/classmap.php): failed to open stream: No such file or directory in /var/www/authorize/sample-code-php-master/autoload.php on line 12
PHP Fatal error: require(): Failed opening required '/var/www/authorize/sample-code-php-master/classmap.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/authorize/sample-code-php-master/autoload.php on line 12

 

However, line 12 is NOT the 'require' line. Rather, it is:

I downloaded the SDK nad the sample code and placed them in a directory in my Apache root. In

conformance with the directive at the bottom of the git-hub page (https://github.com/AuthorizeNet/sample-code-php), I copied the autoload.php file from the sdk-php-1.8.8/ directory into the sample-code-php-master/ directory (and into the Payment Transactions directory). I then ran the command "php PaymentTransactions/charge-credit-card.php" and got the following error message:

 

PHP Warning: require(/var/www/authorize/sample-code-php-master/classmap.php): failed to open stream: No such file or directory in /var/www/authorize/sample-code-php-master/autoload.php on line 12
PHP Fatal error: require(): Failed opening required '/var/www/authorize/sample-code-php-master/classmap.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/authorize/sample-code-php-master/autoload.php on line 12

 

However, line 12 is NOT the 'require' line. Rather, it is:

I downloaded the SDK nad the sample code and placed them in a directory in my Apache root. In

conformance with the directive at the bottom of the git-hub page (https://github.com/AuthorizeNet/sample-code-php), I copied the autoload.php file from the sdk-php-1.8.8/ directory into the sample-code-php-master/ directory (and into the Payment Transactions directory). I then ran the command "php PaymentTransactions/charge-credit-card.php" and got the following error message:

 

PHP Warning: require(/var/www/authorize/sample-code-php-master/classmap.php): failed to open stream: No such file or directory in /var/www/authorize/sample-code-php-master/autoload.php on line 12
PHP Fatal error: require(): Failed opening required '/var/www/authorize/sample-code-php-master/classmap.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/authorize/sample-code-php-master/autoload.php on line 12

 

However, line 12 is NOT the 'require' line. Rather, it is:

 

$merchantAuthentication->setTransactionKey(\SampleCode\Constants::MERCHANT_TRANSACTION_KEY);

 

Am I supposed to replace MERCHANT_TRANSACTION_KEY with a value? If so, where to I locate such a KEY? And where are the instructions that explain this procedure?

 

Titus
Member
1 REPLY 1
RaynorC1emen7
Expert