Reply
Contributor
Posts: 15
Registered: ‎07-11-2018

Re: Payment processing issue while using Accept HOST( embedded iframe method)

@Renaissance 

 

Hi,

 

I have a question for you. The usage of the webhooks and the GetTransactionDetails is not clear for me. Im using fully hosted modal solution. 

I dont fully understand how to integrate the webhooks, I configure them on the merchant interface and the endpoint is the hostedPaymentIFrameCommunicatorUrl. Is this correct?

 

For the other hand is happening that some times the transaction get to authorize (on merchant interface I see the transaction) but I never get a response back. So the Iframe still waiting for an response. Is like the IframeCommunicator never catch the transaction response and never send that to the CommunicationHandler. That is something random sometimes happen some times not. 

 

Im trying to use the GetTransactionDetails to see if there were any error on the transaction. For get that data I need the transaction Id, correct?

There is no way to get the transaction data by other value? Im setting the invoceNumber of the order with a number that I know. There is a way to get the transaction by that number?

 

Thanks for your help!

Highlighted
Trusted Contributor
Posts: 456
Registered: ‎11-05-2018

Re: Payment processing issue while using Accept HOST( embedded iframe method)

[ Edited ]

@mtarantooms01 

 

The endpoint is a totally separate url on your website. So I would have https://renaissance.com/webooks.php for example. I would put that exact url in the merchant interface and subscribe to payment events. My webhooks.php file would work like this, logically:

 

-Customer completes transaction

 

-3 to 5 seconds later a webhook hits my endpoint that hosts my webhooks.php file

-my webhooks.php file has 3 scripts that run in sequence to capture the details of the transaction:

 

 1st is the script that performs a hash validation. If this passes we go to the next script. If it doesn't the app doesn't do anything with whatever was sent to the endpoint (because if the hash didn't match, it is someone other than auth.net sending us data)

 

2nd script will take the webhooks payload and extract the transaction id from it

 

3rd script will run a getTransactionDetails method call using the transId captured by the second. This will get a complete response that you can do anything with

 

All subsequent scripts will be customized depending on your needs. You may have a script that updates your database with the transaction success, inserts transIds, matches IP addresses, or whatever.