Showing results for 
Search instead for 
Did you mean: 

Accept.js help. Newbie questions...

I'm in need of some help with accept.js. I've created a basic form and included the accept.js library link and have the javascript in place (just like the example shows). When I submit the form, I can see in my console the dataDescriptor and dataValue. Now what do I do with it??? I looked at the sample application on GitHub, but it makes no sense to me.....In my sandbox account, I don't see any unsettled transactions. I'm assuming this is because the dataValue actually holds the transaction information, but I don't know what to do with it...


Any help will be appreciated. Like I said, this is new to me (accepting credit card payments, that is).


Hello @atomicimprints


After you have the nonce, you will use createTransactionRequest and use the Nonce for payment data as shown below:


<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
            <dataValue>nonce_here</dataValue >
Administrator Administrator

Hi Richard,


Thanks for that. Do I place the XML in my current PHP page that has my form? Or do I place it in it's own file and call it from the JavaScript function that gets the nonce?

Hello @atomicimprints


While it may be possible to do this on a single page, it is more likely that you'll take the results from your call to Accept.js POST them to a separate page that will perform the actual API submission to ANET.