cancel
Showing results for 
Search instead for 
Did you mean: 

Switching form Developer To Production Mode

Hello,

 

I am using ARB Subscription and i have two different card not present account. My code has works very well on developer mode but i'm trying to configure same code at production mode it does not works. It returns with error "E00007,User authentication failed due to invalid authentication values."

 

I'm using php sdk here, Same code doesn't work's at production mode. I have activated test mode at promoduction code and using test credit cards for testing.

 

But it not works for me at production mode, can anyboddy help me to take this out ?

 

<?
function paymentgateway($creditcard,$expiration_month,$expiration_year,$cvv,$fname,$lname,$email,$country,$state,$address,$zip,$days){


    require_once '/httpdocs/anet_php_sdk/AuthorizeNet.php';

  $creditCardExpirationDate = $expiration_month."-".$expiration_year;

  $subscription = new AuthorizeNet_Subscription;
  $subscription->name = "Monthly Membership";
   $subscription->intervalLength = "8";
   $subscription->intervalUnit = "days";
   $subscription->startDate = date('Y-m-d', strtotime($Date. ' + '.$days.' days'));
   $subscription->totalOccurrences = "9999";
   $subscription->amount = "9.99";
   $subscription->creditCardCardNumber = base64_decode($creditcard);
   $subscription->creditCardExpirationDate= $creditCardExpirationDate;
   $subscription->creditCardCardCode = base64_decode($cvv);
   $subscription->billToFirstName = $fname;
   $subscription->billToLastName = $lname;
   $subscription->customerEmail = $email;
   $subscription->billToAddress = $address;
   $subscription->billToCountry = $country;
   $subscription->billToAddress = $address;
   $subscription->billToZip = $zip;

  // Create the subscription.
  // $request = new AuthorizeNetARB("API Login Key","Tranaction key"); // Development Mode
   $request = new AuthorizeNetARB("API Login Key","API Transaction key"); // Live Mode
   $response = $request->createSubscription($subscription);
   $error = $response->getErrorMessage();
   $subscription_id = $response->getSubscriptionId();

 

  if($subscription_id == false){
      //Error in payment process
      $errrArray = Array();
     $errrArray['error'] = "Error in Credit Card";
     return $errrArray;
   }else
    {
         // Payment Success
        $errrArray = Array();
        $errrArray['transaction_id'] = $subscription_id;
        return $errrArray;
     }
}

?>

 

 

Waiting forward for postitive response.

ni3
Contributor
2 ACCEPTED SOLUTIONS

Accepted Solutions

Did you change it to use the proudction server?

https://github.com/AuthorizeNet/sdk-php/blob/master/README

define("AUTHORIZENET_SANDBOX", false);

View solution in original post

RaynorC1emen7
Expert

Thanks for the response i placed provided code by you and it's works great for me. Thanks a lot.

View solution in original post

2 REPLIES 2

Did you change it to use the proudction server?

https://github.com/AuthorizeNet/sdk-php/blob/master/README

define("AUTHORIZENET_SANDBOX", false);
RaynorC1emen7
Expert

Thanks for the response i placed provided code by you and it's works great for me. Thanks a lot.