cancel
Showing results for 
Search instead for 
Did you mean: 

Accept Hosted Payment IFrameCommunicator problem

Hi

 

1) We are in process of implementing your Accept Hosted Payment solution with 2 stages: authorization and later capture. 
2) We have followed instructions as described in https://developer.authorize.net/api/reference/features/accept_hosted.html

3) We have understood that there is a problem with using this solution with a cross domain + Authorize.net has a bug in their code which prevents us from receiving response from authorization stage.

The scenario is:

1. We load iframecommunicator.html page in iframe under our domain

2. We generate form token using authorize.net api and we display authorize form inside iframe (as explained in link above)

3. When user enters billing details and submits form ("pay now") button, authorize.net code runs "callserver" function and if successful will invoke "sendCommunicationToMerchant" function to send response back to us (see code below). But because it is first time authorize.net code is invoked instead of sending post message - it load our iframecommunicator.html file into authorized.net iframe with response added to url- and here is Authorize.net's bug: 

iframe src url is truncated because quotemarks after first curly braces ("{"). i.e. - this is and example of url as it was loaded into iframe on authorize.net's side:

<iframe src="..../checkout_authorize_communicator.html#action=transactResponse&response={"accountType":"Visa","accountNumber":"XXXX1111","transId":"40049163005","responseCode":"1","authorization":"G12HYX","billTo"....

But when iframecommunicator.html is loaded on our side - we do not receive part after "...&response="

meaning in our iframecommunicator.html -> window.location.hash = "#action=transactResponse&response={"

 

and because of that - we have no knowledge if authorization succeeded on failed.

 

 We would appreciate any help in order to solve our issue here. If we are unable to solves this issue we might be forced to switch to different provider other than Authorize.net

return e.prototype.sendCommunicationToMerchant = function(e, t) {
var n;
this.isValidUrl(e) && ((n = document.getElementById("ifrmCommunicator")) && this.iFrameCommunicator_loaded && n.contentWindow && n.contentWindow.postMessage ? n.contentWindow.postMessage(t, e) : (this.iFrameCommunicator_loaded = !1,
document.getElementById("divIframeCommunicator").innerHTML = '<iframe src="' + e + "#" + t + '" name="ifrmCommunicator" id="ifrmCommunicator"></iframe>',
this.iFrameCommunicator_loaded = !0))
}

 

Thanks

 

Dan

 

DanCommit
Member
0 REPLIES 0