Hi Aaron Wright
I have written a code for credit card registration through Authorize.net using Rails Framework. Below is the process I followed.
1. Generated the CustomerProfileID from Authorize.net
2. Using CustomerProfileID, generated a Token to load "Customer hosted Form". While generating a Token, Sending "hostedProfileReturnUrl"
3. After loading the "Customer hosted form", registering the card details through Authorize.net
4. After registration, on click of "SAVE" button, credit card details are getting saved into Authorize.Net. After this, we should be directed to a screen with 'CONTINUE" button which is currently not getting shown.
Because of which we are not able to come back to our appplication from Authorize.Net.
Below is the code written for redirecting to my application. Could you please help me on fixing this issue?
Code:
transaction = Transaction.new('api_login_id', 'api_transaction_key', :gateway => :sandbox, :verify_ssl => true)
setting = SettingType.new
setting.settingName = SettingNameEnum::HostedProfileReturnUrl
setting.settingValue = "https://returnurl.com/return/"
setting.settingName = SettingNameEnum::HostedProfileReturnUrlText
setting.settingValue = "Continue"
setting.settingName = SettingNameEnum::HostedProfilePageBorderVisible
setting.settingValue = "true"
settings = Settings.new([setting])
request = GetHostedProfilePageRequest.new
request.customerProfileId = customerProfileId
request.refId = rs_type
request.hostedProfileSettings = settings
response = transaction.get_hosted_profile_page(request)
if response.messages.resultCode == MessageTypeEnum::Ok
puts "#{response.messages.messages[0].code}"
puts "#{response.messages.messages[0].text}"
puts "#{response.token}"
else
puts "#{response.messages.messages[0].code}"
puts "#{response.messages.messages[0].text}"
raise "Failed to get hosted profile page with customer profile id #{request.customerProfileId}"
end
end
if __FILE__ == $0
get_hosted_profile_page()
end
08-17-2017 05:00 AM
08-25-2017 05:11 PM
Hi Aaron,
Yes, I can able to load the form in IFrame, And below the URL i am posting along with Token
testauthorizenet/profile/
and the hostedProfileReturnUrl
<IP>:<port>/pp_change_payment_method/ppChangePaymentMethodPage
Thanks,
Kiran B
08-31-2017 12:38 AM
08-31-2017 10:11 AM
Hi Aaron,
Thanks for the suggestion, As you suggested i tried with new URL(https://test.authorize.net/customer/) but for this also i am not able get the CONTINUE after saving the Credit card details
I have attached the Image for the reference.
Thanks,
Kiran B
09-01-2017 12:28 AM