cancel
Showing results for 
Search instead for 
Did you mean: 

DPM / Accept.js

Hi Team,

I am quite new to Authorize.net

I am trying to implement DPM with accept.js as per upgrade guide.

 

But i am not sure how to send billing informaiton with this method ?

Can anyone please help me or share some sample java code with accept.js

raviparmarce88
Regular Contributor
1 ACCEPTED SOLUTION

Accepted Solutions

@raviparmarce88 wrote:

Thanks @Aaron,

Due to some security constrain i cant past the code but i am sure that there is no duplicate call for Accept.dispatchData().


Probably not much I can do to help here then.

 


@raviparmarce88 wrote:

 

Also for my transaction related question, can you please let me know that what is best way to get tranaction response with all the information like last 4digits of card number, transaction id that i have mapped, etc.


Once you get a payment nonce, you send it in the place of the card number in a transaction request to our API. Have you done the part of coding a transaction request to our API? Do you get a response when you send a card number but not when you send the payment nonce?

View solution in original post

7 REPLIES 7

Hi @raviparmarce88,

 

At it's core, Accept.js is just a tool to turn a credit card number into a token that you can pass around without fear of accidentally exposing a customer's payment info. You can use that token in our other API functions in place of the card data. All of your other interaction with our system would be through our API.

 

Have you read through the Accept.js documentation  or our API documentation yet? If so, is there a particular point there I can help you with? We do also have sample code for Java using our Java SDK if that helps.

Aaron
All Star

Thanks you @Aaron

 

I got it..!!!

 

But now the issue is that frequently I am getting E_WC_14:Accept.js encryption failed. error with when call accept.js with necessary data.

 

Eventhough getting error, when I use that token in my API it is giving me success payment response from authorize.net

Response:-- net.authorize.api.contract.v1.TransactionResponse$Messages@5e9c6c
Successfully created transaction with Transaction ID: xxxxxxxxxx
Response Code: 1
Message Code: 1
Description: This transaction has been approved.
Auth Code: xxxxxxxxx

 

I am not confident that it is actual success or not.

 

Also can you please let me konw how can I get row transaction response. Actually I want to fetch few information like last 4digits of card number, address, transaction id ect.

 

raviparmarce88
Regular Contributor

Hi @raviparmarce88,

 

We can look at these as two separate issues:

1. Why are you getting errors with Accept.js?

2. What's the best way to get the transaction information out of the response?

 

Let's start with Accept.js first. A common problem is that people structure their HTML form and their JavaScript so that the Accept.dispatchData call happens twice on form submit. The first call returns a valid nonce; the second call returns an E_WC_14 error, because the Accept.js script will only allow one nonce to be returned each time it's loaded. The script has to be reloaded each time it's used.

 

Can you check over your code and see if you might accidentally be calling Accept.dispatchData twice? Better yet, could you post your whole form code and script code here?

Thanks @Aaron,

Due to some security constrain i cant past the code but i am sure that there is no duplicate call for Accept.dispatchData().

 

Also for my transaction related question, can you please let me know that what is best way to get tranaction response with all the information like last 4digits of card number, transaction id that i have mapped, etc.

raviparmarce88
Regular Contributor

Apart from question posted in above post, I have on more question.

 

Right now we are implementing accept.js mechanism, so still do we really need iFrame implementation ?

Does it really make sense to use iFrame ?


@raviparmarce88 wrote:

Thanks @Aaron,

Due to some security constrain i cant past the code but i am sure that there is no duplicate call for Accept.dispatchData().


Probably not much I can do to help here then.

 


@raviparmarce88 wrote:

 

Also for my transaction related question, can you please let me know that what is best way to get tranaction response with all the information like last 4digits of card number, transaction id that i have mapped, etc.


Once you get a payment nonce, you send it in the place of the card number in a transaction request to our API. Have you done the part of coding a transaction request to our API? Do you get a response when you send a card number but not when you send the payment nonce?


@raviparmarce88 wrote:

 

Right now we are implementing accept.js mechanism, so still do we really need iFrame implementation ?

Does it really make sense to use iFrame ?


 

No, no reason to use an iFrame with Accept.js unless you need it anyway for your own design.