<?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 Re: E00114 Invalid OTS Token at create subscription request after Accept.js in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/E00114-Invalid-OTS-Token-at-create-subscription-request-after/m-p/60884#M35394</link>
    <description>&lt;P&gt;I think i have the same issue like a guy from this topic:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.developer.authorize.net/t5/Integration-and-Testing/error-E00114-testing-on-sandbox/td-p/56973" target="_blank"&gt;https://community.developer.authorize.net/t5/Integration-and-Testing/error-E00114-testing-on-sandbox/td-p/56973&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I took only one token from Accept.js every time i send there different card data&lt;/P&gt;&lt;P&gt;&lt;A href="http://joxi.ru/DrlzpQVC48D6Z2" target="_blank"&gt;http://joxi.ru/DrlzpQVC48D6Z2&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Dec 2017 13:24:09 GMT</pubDate>
    <dc:creator>serg1992a</dc:creator>
    <dc:date>2017-12-16T13:24:09Z</dc:date>
    <item>
      <title>E00114 Invalid OTS Token at create subscription request after Accept.js</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/E00114-Invalid-OTS-Token-at-create-subscription-request-after/m-p/60883#M35393</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I'm trying to use Accept.js + my Server request to create subscription.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here a code i found at documentation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;// Set the transaction's refId
        $refId = 'ref' . time();
        // Subscription Type Info
        $subscription = new AnetAPI\ARBSubscriptionType();
        $subscription-&amp;gt;setName("Socks Subscription ".mt_rand(0,9999));
        $interval = new AnetAPI\PaymentScheduleType\IntervalAType();
        $interval-&amp;gt;setLength(23);
        $interval-&amp;gt;setUnit("days");
        $paymentSchedule = new AnetAPI\PaymentScheduleType();
        $paymentSchedule-&amp;gt;setInterval($interval);
        $paymentSchedule-&amp;gt;setStartDate(new DateTime('2019-01-22'));
        $paymentSchedule-&amp;gt;setTotalOccurrences("12");
        $paymentSchedule-&amp;gt;setTrialOccurrences("1");
        $subscription-&amp;gt;setPaymentSchedule($paymentSchedule);
        $subscription-&amp;gt;setAmount(rand(1,99999)/12.0*12);
        $subscription-&amp;gt;setTrialAmount("0.00");


        $payment = new AnetAPI\PaymentType();

        $creditCard = new AnetAPI\CreditCardType();
        $creditCard-&amp;gt;setCardNumber("4111111111111111");
        $creditCard-&amp;gt;setExpirationDate("2038-12");
        $payment-&amp;gt;setCreditCard($creditCard);

        $subscription-&amp;gt;setPayment($payment);


        $order = new AnetAPI\OrderType();
        $order-&amp;gt;setInvoiceNumber("1234354");
        $order-&amp;gt;setDescription("Description of the subscription");
        $subscription-&amp;gt;setOrder($order);

        $billTo = new AnetAPI\NameAndAddressType();
        $billTo-&amp;gt;setFirstName("John");
        $billTo-&amp;gt;setLastName("Smith");
        $subscription-&amp;gt;setBillTo($billTo);
        $request = new AnetAPI\ARBCreateSubscriptionRequest();
        $request-&amp;gt;setmerchantAuthentication($this-&amp;gt;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::SANDBOX);

        if (($response != null) &amp;amp;&amp;amp; ($response-&amp;gt;getMessages()-&amp;gt;getResultCode() == "Ok") )
        {
            echo "SUCCESS: Subscription ID : " . $response-&amp;gt;getSubscriptionId() . "\n";
        }
        else
        {
            echo "ERROR :  Invalid response\n";
            $errorMessages = $response-&amp;gt;getMessages()-&amp;gt;getMessage();
            echo "Response : " . $errorMessages[0]-&amp;gt;getCode() . "  " .$errorMessages[0]-&amp;gt;getText() . "\n";
        }&lt;/PRE&gt;&lt;P&gt;It's working well, but it insert card data directly. I want to use Accept.js so i switched&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;$creditCard = new AnetAPI\CreditCardType();&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;$creditCard-&amp;gt;setCardNumber("4111111111111111");&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;$creditCard-&amp;gt;setExpirationDate("2038-12");&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;$payment-&amp;gt;setCreditCard($creditCard);&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$opaqueData = new AnetAPI\OpaqueDataType();
        $opaqueData-&amp;gt;setDataDescriptor("COMMON.ACCEPT.INAPP.PAYMENT");
        $opaqueData-&amp;gt;setDataValue($opaquedataValue);
        $payment-&amp;gt;setOpaqueData($opaqueData);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;$opaquedataValue contains a value i recieved from Accept.js&amp;nbsp;&lt;/P&gt;&lt;P&gt;So now it's not working and i have&amp;nbsp;&lt;SPAN&gt;ERROR : Invalid response Response : E00114 Invalid OTS Token.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What is wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Please help me :)&lt;/P&gt;</description>
      <pubDate>Sat, 16 Dec 2017 13:14:09 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/E00114-Invalid-OTS-Token-at-create-subscription-request-after/m-p/60883#M35393</guid>
      <dc:creator>serg1992a</dc:creator>
      <dc:date>2017-12-16T13:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: E00114 Invalid OTS Token at create subscription request after Accept.js</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/E00114-Invalid-OTS-Token-at-create-subscription-request-after/m-p/60884#M35394</link>
      <description>&lt;P&gt;I think i have the same issue like a guy from this topic:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.developer.authorize.net/t5/Integration-and-Testing/error-E00114-testing-on-sandbox/td-p/56973" target="_blank"&gt;https://community.developer.authorize.net/t5/Integration-and-Testing/error-E00114-testing-on-sandbox/td-p/56973&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I took only one token from Accept.js every time i send there different card data&lt;/P&gt;&lt;P&gt;&lt;A href="http://joxi.ru/DrlzpQVC48D6Z2" target="_blank"&gt;http://joxi.ru/DrlzpQVC48D6Z2&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Dec 2017 13:24:09 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/E00114-Invalid-OTS-Token-at-create-subscription-request-after/m-p/60884#M35394</guid>
      <dc:creator>serg1992a</dc:creator>
      <dc:date>2017-12-16T13:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: E00114 Invalid OTS Token at create subscription request after Accept.js</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/E00114-Invalid-OTS-Token-at-create-subscription-request-after/m-p/60886#M35396</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/22928"&gt;@serg1992a&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;We generally get the above response code in the following case:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When payment token is not found on the server (most likely because it already got used).&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Can you please try generating the new token and try with it ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, sometimes incase of duplicate transactions, you encounter this issue. As it is a One time token, therefore, in the very first transaction it was consumed and for the second and forth coming transactions it is giving you this error.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Dec 2017 16:27:59 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/E00114-Invalid-OTS-Token-at-create-subscription-request-after/m-p/60886#M35396</guid>
      <dc:creator>AforANET</dc:creator>
      <dc:date>2017-12-16T16:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: E00114 Invalid OTS Token at create subscription request after Accept.js</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/E00114-Invalid-OTS-Token-at-create-subscription-request-after/m-p/60890#M35400</link>
      <description>&lt;P&gt;&amp;nbsp;Hi&amp;nbsp;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/22928"&gt;@serg1992a&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As mentioned by&amp;nbsp;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/22716"&gt;@AforANET&lt;/a&gt;&amp;nbsp;you can get the E00114 error code if the token has been already used for a transaction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, you will also get the E00114 error if&amp;nbsp; the token you are generating in a different environment (eg Sandbox) and making create transaction request to different environment (e.g production)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please make sure the accept.js and the create transaction request is being made to the same account on the same enviornment (either Sandbox or Production).&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 13:31:15 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/E00114-Invalid-OTS-Token-at-create-subscription-request-after/m-p/60890#M35400</guid>
      <dc:creator>kikmak42</dc:creator>
      <dc:date>2017-12-18T13:31:15Z</dc:date>
    </item>
  </channel>
</rss>

