- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am trying to develop the CIM for an e-commerce cart. I have everything built except the ability to get the token. The XML documentation says to use the getHostedProfilePageRequest, yet I found none in the PHP SDK.
Can anyone tell me if this exists?
Thanks,
Nick
Solved! Go to Solution.
โ04-20-2012 02:57 PM
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It not in the SDKs yet. But one of the user post some php code for it.
โ04-20-2012 05:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It not in the SDKs yet. But one of the user post some php code for it.
โ04-20-2012 05:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm doing a rails project for a contract and I'm also having the same issues integrating with the hosted version CIM offers. This is a critical method and the documentation kind of glazes over it and none of the SDK's/sample seem to give an example of calling or support for calling it. I've figured out how to call it and actually also have found the source to the authorize_net gem (https://github.com/joevandyk/authorize-net) and could integrate it without too much trouble it looks like, however, it looks like the license is pretty restrictive.
What my question is, and this is geared more towards authorize.net legal and/or support: Is it OK according to the license that I fork the above repository and add the getHostedProfilePage so I can use this with my production app? I will contribute back the changes so that other users can take advantage of this functionality.
For those that have been struggling with this here is a workaround for ruby. Should be similar in other languages as it's a POX service:
module HostedCimTransaction def get_hosted_profile_page(profile_id, options = {}) payload = <<END_OF_MESSAGE <?xml version="1.0" encoding="utf-8"?> <getHostedProfilePageRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"> <merchantAuthentication> <name>#{AUTHORIZE_NET_CONFIG['api_login_id']}</name> <transactionKey>#{AUTHORIZE_NET_CONFIG['api_transaction_key']}</transactionKey> </merchantAuthentication> <customerProfileId>#{profile_id}</customerProfileId> </getHostedProfilePageRequest> END_OF_MESSAGE url = URI.parse("#{get_gateway(options)}/getHostedProfilePage") request = Net::HTTP::Post.new(url.path) request.content_type = 'text/xml' request.body = payload connection = Net::HTTP.new(url.host, url.port) connection.use_ssl = true response = HostedCimResponse.new(connection.start {|http| http.request(request)}, nil) return response end def get_gateway(options) case options[:gateway] when :sandbox, :test return 'https://apitest.authorize.net/xml/v1/request.api' when :production, :live return 'https://api.authorize.net/xml/v1/request.api' else return options[:gateway] end end end
class HostedCimResponse < AuthorizeNet::XmlResponse def initialize(raw_response, transaction) super unless connection_failure? begin @token = node_child_content_unless_nil(@root.at_css('token')) rescue @raw_response = $! end end end def token @token end end
โ04-21-2012 04:47 PM - edited โ04-21-2012 04:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry all. The response class should be this:
class HostedCimResponse < AuthorizeNet::XmlResponse def initialize(raw_response, transaction) puts raw_response super unless connection_failure? begin @token = node_content_unless_nil(@root.at_css('token')) rescue @raw_response = $! end end end def token @token end end
โ04-21-2012 05:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there mixin_mobile,
Unfortunately Authorize.Net is prohibited from providing you with any kind of legal advice. We suggest seeking legal guidance to ensure full compliance with the terms of the Software Development Kit License Agreement.
Thanks,
Michelle
Developer Community Manager
โ05-08-2012 12:36 PM

