So I thought accept.js was the answer to my integration. Post credit card details directly from the client browser to auth.net and it never even hits my servers. Just save the token (or nonce). But I'm finding it only works once?! If i enter a new card and save it, then post a transaction, it works, but only the first time.
Did I misunderstand the purpose of accept.js? Is it supposed to only work once?
Solved! Go to Solution.
08-03-2016 12:14 PM
Hello @rickstout
You are currect that in it's current form you can only use it for new transactions. An update coming very soon will will expand support for using Accept.js for creating customer profiles and for creating subscriptions, making it usable for all transactions.
I would suggest watching our blog, or even subscribing so you'll be the first to know.
Richard
08-03-2016 12:29 PM
Hello @rickstout
You are currect that in it's current form you can only use it for new transactions. An update coming very soon will will expand support for using Accept.js for creating customer profiles and for creating subscriptions, making it usable for all transactions.
I would suggest watching our blog, or even subscribing so you'll be the first to know.
Richard
08-03-2016 12:29 PM
Thanks. Wish the docs would have been clear about that.
08-03-2016 01:27 PM
Hi,
What does the JSON cardData payload look like for including the CVV security code?
For example in step #3 here only has the PAN and expiration date mentioned,
http://developer.authorize.net/api/reference/features/acceptjs.html
cardData.cardNumber = document.getElementById('CARDNUMBER_ID').value;
cardData.month = document.getElementById('EXPIRY_MONTH_ID').value;
cardData.year = document.getElementById('EXPIRY_YEAR_ID').value;
I couldn't find any documentation about the Accept functions and data structures, i.e.
Accept.dispatchData(secureData, 'responseHandler'). Does such documentation exist?
Also IMO it would be better if the Accept.dispatchData() supported a non-global functions for the 'responseHandler' callback. Is that a technical limitation why it takes a string value?
Thanks
08-11-2016 04:37 PM
Hello @blackbeltdev
Accept.js documentation is scheduled for an update week, but here are some items that should help.
This method sends the secure data to Authorize.Net and provides the response handler which will receive the payment nonce.
Parameter | Type | Description |
---|---|---|
data | SecureData | This object contains the payment data to be sent to Authorize.Net. |
callback | String | This function handles the response from Authorize.Net. |
This object contains the merchant identifier and payment data.
Property | Type | Description |
---|---|---|
secureData | SecureData Object | This object is the payment data to be sent to Authorize.Net. |
authData | AuthData Object | This object contains the data used by Authorize.Net to identify the merchant who will eventually use the card data. |
This object contains the payment data which is dispatched to Authorize.Net.
Property | Type | Description |
---|---|---|
cardNumber | String | Must be a valid 13-16 digit card number. Required. |
month | String | 2-digit month. Required |
year | String | 2-digit year. Required |
cardCode | String | 3 or 4-digit card validation value (CVV). Optional |
zip | String | 20-character alphanumeric representing postal code. Optional |
fullName | String | 64-character alphanumeric cardholder name. Optional |
This object contains the data used by Authorize.Net to identify the merchant who will eventually use the card data.
Property | Type | Description |
---|---|---|
apiLoginID | String | API Login ID of the merchant. It can be found in the Authorize.Net merchant interface at Account > Settings > Security Settings > General Security Settings > API Credentials and Keys. Required. |
clientKey | String | Public key for the merchant. It can be generated in the Authorize.Net Merchant interface at Account > Settings > Security Settings > General Security Settings > Manage Public Client Key. Required. |
08-12-2016 07:45 AM - edited 08-12-2016 08:11 AM
@rickstout You can now create a customer payment profile with the Accept payment nonce, so that you can charge the card on a recurring/future/ad-hoc basis.
So instead of/as well as doing a CReateTransaction you can do
<createCustomerPaymentProfileRequest>
<merchantAuthentication>
</merchantAuthentication>
<customerProfileId>10000</customerProfileId>
<paymentProfile>
<payment>
<opaqueData>
<dataDescriptor>COMMON.ACCEPT.INAPP.PAYMENT</dataDescriptor>
<dataValue>nonce_here</dataValue >
</opaqueData>
</payment>
</paymentProfile>
<validationMode>testMode</validationMode>
</createCustomerPaymentProfileRequest>
08-12-2016 08:45 AM
@blackbeltdev You are absolutely right and we should support a function as well as a function name for the responseHandler. No technical limitations, hands up, it was a miss on our side. It will be fixed in the next release.
Brian
08-12-2016 08:48 AM
Perfect this is exactly what I was looking for! The only other question I had is if the dispatch method could be updated in a future release to support taking a function for the 'callback' argument in addtion to a string, i.e. function | string
For instance let's say I wanted to create an Angular service that was self-contained to manage the response handler. I believe the current API requires me to install a global function to work which IMO violates separation of concerns. If this is a technical limitation I can live with that but to make the API cleaner it should accept a function if possible.
Thanks
08-12-2016 08:59 AM
You beat me to the punch! Thanks!
08-12-2016 09:02 AM
11-18-2016 09:42 AM - edited 11-18-2016 09:56 AM