Reply
Member
Posts: 8
Registered: ‎05-14-2019
Accepted Solution

Hosted Accept.js Postal Code Issues

Issue 1 - AVS for postal code validation is on. Based upon this, it would be great if the accept.js popup would require a zipcode, but it does not.

 

To help with this I'm requiring the postal code to have a value in the Authorize.net Payment Form - Fields settings. A user can still submit without a postal code, but the payment will fail (better than nothing, I suppose).

 

Issue 2 - Because I am requiring the postal code in the settings this seems to also require the postal code to be sent when calling a refund transaction request. However, the postal code was not passed back in the Accept.js hosted form response during the payment capture. Documentaiton seems to suggest it is embedded into the nonce, but this is an ecnrypted string. All other fields seem to be sent back except postal code.

 

Any advice other than disabling AVS?


Accepted Solutions
Solution
Accepted by topic author george3380
‎05-26-2019 09:34 AM
All Star
Posts: 685
Registered: ‎11-05-2018

Re: Hosted Accept.js Postal Code Issues

@george3380

For issue #1, I don’t exactly follow. You would want the payment to fail without a zip/postal code if you are using AVS, correct?

For issue #2, what you need for your refund script is a getTransactionDetails method call. Run that to pull the whole transaction and extract the zip code + the last 4 digits from that method call response. So your refund script would have two method calls. You might have a form post that posts the transaction id and amount to be refunded to your script. The transId can be ran in the getTransactionDetails call to pull the zip and last 4 of CC. Then you have all the pieces you need to run the refund transaction.

View solution in original post


All Replies
Solution
Accepted by topic author george3380
‎05-26-2019 09:34 AM
All Star
Posts: 685
Registered: ‎11-05-2018

Re: Hosted Accept.js Postal Code Issues

@george3380

For issue #1, I don’t exactly follow. You would want the payment to fail without a zip/postal code if you are using AVS, correct?

For issue #2, what you need for your refund script is a getTransactionDetails method call. Run that to pull the whole transaction and extract the zip code + the last 4 digits from that method call response. So your refund script would have two method calls. You might have a form post that posts the transaction id and amount to be refunded to your script. The transId can be ran in the getTransactionDetails call to pull the zip and last 4 of CC. Then you have all the pieces you need to run the refund transaction.
Member
Posts: 8
Registered: ‎05-14-2019

Re: Hosted Accept.js Postal Code Issues

@Renaissance

#2 is great advice. Thank you!

#1 ideally if AVS is on, the UI would require the zip code to be filled out, liming a failed payment. Even with an AVS required zip code, the hosted form doesn't enforce the requirement.
Highlighted
All Star
Posts: 685
Registered: ‎11-05-2018

Re: Hosted Accept.js Postal Code Issues

@george3380 

 

You are welcome my friend. I have yet to do an Accept.js integration. I've done php based hosted forms thus far. On those you can set the fields to required. I would double check the API reference and see if you have a workaround. Could you kindly mark this question solved? Best luck to you.