Reply
Highlighted
Member
Posts: 3
Registered: ‎12-07-2016

hosted pay on accept.js

in the accept.js example that is posted on the authorize.net to download and test it, there are two ways of payment "pay" and "hosted pay" both use the accept.js library, on the hosted pay there is a page called getHostedPaymentForm.php, I checked out the source code and there is an xml that is supposed to call the api method "getHostedPaymentPageRequest" which  pops up the payment page from authorize.net in there you are supposed to type your credit card, the thing is there is no documentation about it "getHostedPaymentPageRequest", so there is no way I can implement this hosted accept.js payment method on my software.

Highlighted
Contributor
Posts: 14
Registered: ‎11-30-2016

Re: hosted pay on accept.js

Hi Jesus,

 

I just implemented the hosted pay option without accept.js (there is a discussion that gives an overview of the process here https://community.developer.authorize.net/t5/Integration-and-Testing/Help-Migrating-from-SIM-to-CIM-...).

 

I haven't explored the accept.js route much but my general understanding is that you use accept.js to generate a nonce which can then be used with the API to charge a card, create and ARB, etc.

Highlighted
Posts: 2,765
Topics: 57
Kudos: 247
Blog Posts: 67
Registered: ‎12-05-2011

Re: hosted pay on accept.js

Hello @jesusdavidrubio @eisemann970

 

getHostedPaymentPageRequest is part of a new feature not yet widely available, but if you would like to explore it further, you can see the documentation at https://developer.authorize.net/api/reference/features/accept_hosted.html

 

Richard

Highlighted
Member
Posts: 3
Registered: ‎12-07-2016

Re: hosted pay on accept.js

Hello richard and @eisemann970

 

Your comments have been really helpfull thank you both so much.

I understand better the hosted form pay situation, but I still have questions about it

 

 getHostedPaymentPageRequest is part of a new feature not yet widely available, so it means it is not available yet to use ? if not should I use the solution that @eisemann970 implemended, which is the use of the hosted form to create and update credit cards remotely and then using webhooks for adding the the credit card tokens back to our local app to later pay using them. (@eisemann970 please correct me if I am wrong on what you did).

 

Based on this there is no way to pay directly using authorize.net hosted form unless we use the new feature "accept hosted using" right ?

 

 

 

 

 

 

 

Highlighted
Contributor
Posts: 14
Registered: ‎11-30-2016

Re: hosted pay on accept.js

To be clear, I'm not using webhooks.

 

I'm using

  1. the hosted add payment page in an iframe (in a lightbox) to create user profiles/user payment profiles and
  2. the iFrameCommunicator to trigger updates via JavaScript.  
  3. Then I use the API to charge the card.
Highlighted
Contributor
Posts: 14
Registered: ‎11-30-2016

Re: hosted pay on accept.js

I believe the first part is called "Hosted CIM"

Highlighted
Member
Posts: 3
Registered: ‎12-07-2016

Re: hosted pay on accept.js

hi @eisemann970 I am trying to implemente the hosted cim, I am capable rigth now to save the credit card payment using the authorize hosted form but I am not capable to comunicate  with it using the iFrameCommunicator to get information, could you give me an example of the estructure of this file.

 

thanks in advance

 

Highlighted
Contributor
Posts: 14
Registered: ‎11-30-2016

Re: hosted pay on accept.js


@jesusdavidrubio wrote:

hi @eisemann970 I am trying to implemente the hosted cim, I am capable rigth now to save the credit card payment using the authorize hosted form but I am not capable to comunicate  with it using the iFrameCommunicator to get information, could you give me an example of the estructure of this file.

 

thanks in advance

 


Hi Jesus,

 

When I set up the call to getHostedProfilePageRequest, I send in a setting named "hostedProfileIFrameCommunicatorUrl" with a value of "https://www.MYDOMAIN.com/PATH_TO/iFrameCommunicator.html".

 

I thought I read somewhere that you have to use HTTPS.  I'm pretty sure I read that you have to use the entire domain name in the callback URL (not just the PATH_TO/iFrameCommunicator.html).

Highlighted
Contributor
Posts: 14
Registered: ‎11-30-2016

Re: hosted pay on accept.js

Also, in the view that contains the form that posts to https://test.authorize.net/customer/addPayment (NOTE that this is the sandbox link) and targets the iFrame, I have the following JavaScript (that I lifted from the accept sample application):

 

window.CommunicationHandler = {};

 

CommunicationHandler.onReceiveCommunication = function (argument) { ... }