cancel
Showing results for 
Search instead for 
Did you mean: 

Who Me Too'd this topic

CONTINUE BUTTON Issue

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

                

 

bkiran26
Contributor
Who Me Too'd this topic