cancel
Showing results for 
Search instead for 
Did you mean: 

Accept.JS question

Hello

I'm created sample using code from http://developer.authorize.net/api/reference/features/acceptjs.html

in my console log, I see this:

COMMON.ACCEPT.INAPP.PAYMENT

9471617575682072705001

what that means and how to actually charge credit card? on above site I don't see where I need to write amount to be charged.

Thank you.

zamiksica123
Contributor
3 REPLIES 3

Hello @zamiksica123

 

As shown on the Accept.js documentation, after you have the nonce you then perform a normal Authorize.Net API transaction request using the nonce instead of card data:

 

<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
   <merchantAuthentication>
     <name>yours</name>
     <transactionKey>yours</transactionKey>
   </merchantAuthentication>
   <transactionRequest>
      <transactionType>authCaptureTransaction</transactionType>
      <amount>75.00</amount>
      <payment>
         <opaqueData>
            <dataDescriptor>COMMON.ACCEPT.INAPP.PAYMENT</dataDescriptor>
            <dataValue>nonce_here</dataValue >
         </opaqueData>
      </payment>
   </transactionRequest>
</createTransactionRequest>
					

Richard

 

RichardH
Administrator Administrator
Administrator

Hello

thank you.

My transaction works but in the console, I see this:

 

<b>Warning</b>:  SimpleXMLElement::__construct(): namespace warning : xmlns: URI AnetApi/xml/v1/schema/AnetApiSchema.xsd is not absolute in <b>C:\inetpub\vhosts\mydomain.com\httpdocs\web\transactionCaller.php</b> on line <b>25</b><br />
<br />
<b>Warning</b>:  SimpleXMLElement::__construct(): &lt;createTransactionRequest xmlns=&quot;AnetApi/xml/v1/schema/AnetApiSchema.xsd&quot;&gt; in <b>C:\inetpub\vhosts\mydomain.com\httpdocs\web\transactionCaller.php</b> on line <b>25</b><br />
<br />
<b>Warning</b>:  SimpleXMLElement::__construct():                                                                          ^ in <b>C:\inetpub\vhosts\mydomain.com\httpdocs\web\transactionCaller.php</b> on line <b>25</b><br />
<br />
<b>Warning</b>:  simplexml_load_string(): namespace warning : xmlns: URI AnetApi/xml/v1/schema/AnetApiSchema.xsd is not absolute in <b>C:\inetpub\vhosts\mydomain.com\httpdocs\web\transactionCaller.php</b> on line <b>57</b><br />
<br />
<b>Warning</b>:  simplexml_load_string(): ttp://www.w3.org/2001/XMLSchema&quot; xmlns=&quot;AnetApi/xml/v1/schema/AnetApiSchema.xsd&quot; in <b>C:\inetpub\vhosts\mydomain.com\httpdocs\web\transactionCaller.php</b> on line <b>57</b><br />
<br />
<b>Warning</b>:  simplexml_load_string():                                                                                ^ in <b>C:\inetpub\vhosts\mydomain.com\httpdocs\web\transactionCaller.php</b> on line <b>57</b><br />
{"messages":{"resultCode":"Ok","message":{"code":"I00001","text":"Successful."}},"transactionResponse":{"responseCode":"1","authCode":"YYPLVP","avsResultCode":"Y","cvvResultCode":"P","cavvResultCode":"2","transId":"60006862959","refTransID":{},"transHash":"570F2C2815FD2FE25B60A1F49AFDE42B","testRequest":"0","accountNumber":"XXXX1881","accountType":"Visa","messages":{"message":{"code":"1","description":"This transaction has been approved."}},"transHashSha2":{}}}

How to get rid of that?

Thank you 

I solved those errors by adding LIBXML_NOWARNING