cancel
Showing results for 
Search instead for 
Did you mean: 

Accept Customer Hosted Page - how to determine result?

If we use getHostedProfilePageRequest to obtain a token for a customer to enter their payment information on an Accept Customer Hosted Form, and we are using a full page redirect to that hosted page, is there a way for us to determine whether the customer successfully saved a payment method on that form, both in cases where they returned to a page under our control (presumably using the parameter hostedProfileReturnUrl, and we note there is no "cancelURL" variant for this API), and via a Webhook if they close their browser before returning?

dsandberg
Contributor
10 REPLIES 10

I am using the Host to Add a New credit card, and I could not find how to change the URL if the end user clicks on CANCEL, if the end user clicks on Cancel, I want a different page url, and if they

succesfully completed, then, a to go the link below, I can add a parameter to it.  

 

1- Can we change the text to Cancel?

2- Can we change the URL if the user clicks on CANCEL?

 

I know it's available on the "hostedPayment", but, I am using "getHostedProfilePageRequest" and need to add these requirements to the "getHostedProfilePageRequest".   Be aware that the example provided on GitHub, shows it as a PopUp, but I need it as an IFrame, the issue I am encountering, the only values that are being returned are the width, and height, but I need to know if A) the end user clicked on Cancel, or B, if they went all the way through and completed it.  I am aware that the last button also does not have an Id, which was an option for me to listen to it being clicked.

 

 

Are we limited with what we can do?  is it even possible?  for the getHostedProfilePageRequest, and it cannot be the  "hostedPayment...", i know it's possible through "hostedPayment...", but it doesn't appear to be in "hostedProfile..." options available.  

 

See example below:

 

settings[0] = new settingType();
settings[0].settingName = settingNameEnum.hostedProfileSaveButtonText.ToString();
settings[0].settingValue = "Add Me";


settings[2] = new settingType();
settings[2].settingName = settingNameEnum.hostedProfileReturnUrlText.ToString();
settings[2].settingValue = "Done";

settings[3] = new settingType();
settings[3].settingName = settingNameEnum.hostedProfileReturnUrl.ToString();
settings[3].settingValue = "https://localhost:53967/Customer/";

settings[4] = new settingType();
settings[4].settingName = settingNameEnum.hostedProfileIFrameCommunicatorUrl.ToString();
settings[4].settingValue = "https://localhost:53967/IFrameCommunicator/";

 

var request = new getHostedProfilePageRequest();
request.customerProfileId = customerProfileId;
request.hostedProfileSettings = settings;

var controller = new getHostedProfilePageController(request);

controller.Execute();

var response = controller.GetApiResponse();