Posted on 17/01/2024 09:20:31
Hi Imar,
I will try to clarify this from beginning with the help of my colleague since I'm not sure if I described the problem properly the first time (sorry for any confusion). Basically, we are working on the integration with the external service for crypto payments called "PayCek". In order to do this, we created new assembly file (.dll) in C# with class which inherits Dynamics Web "CheckoutHandler" base class.
We managed to call the external service without issues. Once the client choses the "PayCek" payment method, he is redirected to the PayCek page to finish the payment.
Now, "PayCek" service allows the callbacks back to the caller (in this case, Dynamic Web) since paymet processing can take some time. Only thing we need to do is to provide the "Callback" URL to the "PayCek" service. Process for generating the callback URL which Dynamic Web can handle is described in detail in DW documentation:
Here is the example of the URL which we generated with this method, which we forward to the "Paycek" service on the initial call:
"HTTP://192.168.5.29/Default.aspx?ID=1844&CheckoutHandlerOrderID=ORDER1471"
If we call this method manually on server trough Postman, it works without issues.
Issue here is that "Paycek" service adds its additional parameters to the callback URL which is generated by Dynamic Web. Here is the example of that URL:
"HTTP://192.168.5.29/Default.aspx?ID=1844&CheckoutHandlerOrderID=ORDER1471&id=ORDER1471&status=successful&dst_amount=21.55&src_amount=0.0008831&dst_currency=EUR&payment_code=HGI5Qvrphkis6-xURqWy1VbuQ49MrSPnEbXTKiuZptFq&profile_code=bitjVPzgjx7FKHzn_MwXggOLFx_C-zuddE162DpDeE0k&src_currency=BTC&tx_fee_amount=0.00032&receive_coin_tag=&receive_coin_address=bc1q87se3taewvm94a3k9txcegnxdmg98qw3mez0re&exchange_rate_dst_src=38270.187523&exchange_rate_src_dst=0.0000261300"
Basically, DW does NOT catch this URL. What we found out is that "Paycek" service adds its own "id" parameter for which we guess causes issues and DW does not recognize the URL
We tried to call this URL manually directly from the server where DW is hosted, and DWs "Redirect" method was not triggered. But if we remove the additional "id" parameter (added by Paycek) from the URL and then to the GET call from Postman, Dynamic web normally catches the method (code in the "Redirect" method is triggered)
Now, issue here is that we don't know how to proceed with this... we can't rename the "ID" parameter which is generated by Dynamic Web. But of course, we also can't ask the team behind "Paycek" service to rename / remove "id" from their side. Our guess is that this parameter duplicated causes the issue of DW not catching the GET request (callback). Please, correct us if we missed anything here.
Do you have any proposals on how to proceed on this issue?
Thank you very much for the provided assistance so far.
Tomislav B.