cancel
Showing results for 
Search instead for 
Did you mean: 

Some problems on ACCEPT HOSTED

Hi all, 

 

I faced some problems when trying to use ACCEPT HOSTED .

I followed the github here: https://github.com/AuthorizeNet/accept-sample-app

And found that it didn't work at all.

 

What i did is as follows:

 

  1. Created an sandbox account.
  2. Set ENVIRONMENT variables API_LOGIN_ID and TRANSACTION_KEY in httpd.conf
  3. Logined this sample with customer profile ID(witch created in this page:http://developer.authorize.net/api/reference/index.html#customer-profiles-create-customer-profile)

After logined, when i clicked button 'Hosted Pay', It just showed me "Missing or invalid token.".

 
Any idea on this??
And i also want to know what will response to me if i submit the ACCEPT HOSTED form successfully?
 
Could anyone help me?
 
Thanks a lot.
 
tblsandbox01
Member
3 REPLIES 3

Hello @tblsandbox01

 

This is the correct method to obtain an Accept Hosted payment form token (not a customer profile id or token).

 

<getHostedPaymentPageRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
	<merchantAuthentication>
		<name>API_LOGIN</name>
		<transactionKey>TRANSACTION_KEY</transactionKey>
	</merchantAuthentication>
	<transactionRequest>
		<transactionType>authCaptureTransaction</transactionType>
		<amount>20.00</amount>
	</transactionRequest>
	<hostedPaymentSettings>
		<setting>
			<settingName>hostedPaymentBillingAddressOptions</settingName>
			<settingValue>{"show": true, "required":true}</settingValue>
		</setting>
		<setting>
			<settingName>hostedPaymentButtonOptions</settingName>
			<settingValue>{"text": "Pay"}</settingValue>
		</setting>
		<setting>
			<settingName>hostedPaymentReturnOptions</settingName>
			<settingValue>{"url":"https://www.mystore.com/good","urlText":"Continue","cancelUrl":"https://www.mystore.com/cancel","cancelUrlText":"Cancel"}</settingValue>
		</setting>
	</hostedPaymentSettings>
</getHostedPaymentPageRequest>

 

Richard

RichardH
Administrator Administrator
Administrator

Thank you very much, @RichardH, it works now.

 

However, i have another question on using ACCEPT HOSTED

 

Currently we are using ARB for the payment function in our system. We stored user's credit card information(with CIM) and scheduled a plan in our DB and run a cron job to create ARB every day. It is perfectly working for several years.
 
However, we're required to remove the user credit card information from our database to ensure we aligned the PCI compliance. We looked into the APIs of authorize.net these days and looks like  
the Accept Hosted is a choice. 
 
However, we didn't find any docs mentioned that Accept Hosted supports ARB. (Actually, we noticed that we can create a subscription from an existing customer profile instead of credit card information,  in this method, we only need the customerProfileId and customerPaymentProfileId to create the ARB without CC info, but we cannot get these necessary info from the returns of Accept Hosted form!!!! ).
 
In this case, may i know what's the solution to approach PCI compliance when using ARB?
 
Any suggestion will be appreciated.
 
-Regards.

Hello @tblsandbox01

 

Accept Hosted does not work with ARB, but we do offer Accept Customer, hosted forms for managing customer profiles.  You can learn more about using these forms at http://developer.authorize.net/api/reference/features/customer_profiles.html near the bottom.

 

Richard