Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How POST request from client-side directly
#1
Question 
Hello,

I want to POST Request directly from the Browser side, which must not go through the Server side as shown in the picture.(This is a payment gateway requirement.)

[Image: Request.jpg]
Currently, I am using REST Client to manage requests, but the results show that Gateway cannot verify it because the request is sent from my server.

Please advise me which command to use to send the POST Request so that the command is sent/received directly from the Client side only.

Thank you
Reply
#2
First thing: Why the gateway doesn't allow requests from your server? This should be configurable on the gateway.

You can craft a JS request on your server, in JavaScript, send it to your browser and the browser will manage to send it directly to your gateway.

However this is not something for which I can create a simple demo.

It would be interesting to know the answer for the first question first.
Reply
#3
(01-09-2024, 06:02 AM)Alexandre Machado Wrote:
Quote:First thing: Why the gateway doesn't allow requests from your server? This should be configurable on the gateway.


You can craft a JS request on your server, in JavaScript, send it to your browser and the browser will manage to send it directly to your gateway.

However this is not something for which I can create a simple demo.

It would be interesting to know the answer for the first question first.

ฺBecause, Only in the case customer makes a payment with a credit card, it is necessary to the browser send card information in order to receive the Token directly from the Payment Gateway Server. My server never has to deal with sensitive card information. Unless I have PCI-DSS license to send server side.
This is a necessary condition for accepting credit card payments to protect customer card information.
But other steps or payment via other methods do not need to be send request directly from the Browser.
Reply
#4
(01-06-2024, 05:40 AM)baxing Wrote: Hello,

I want to POST Request directly from the Browser side, which must not go through the Server side as shown in the picture.(This is a payment gateway requirement.)

[Image: Request.jpg]
Currently, I am using REST Client to manage requests, but the results show that Gateway cannot verify it because the request is sent from my server.

Please advise me which command to use to send the POST Request so that the command is sent/received directly from the Client side only.

Thank you

Hi,

I have worked with payment gateway interfaces and IW for many years. Do you mind saying what gateway you are working with.

Looks to me like one or two important steps are missing in your description/ design.
Reply
#5
Hi,

I have no problems using Intraweb connect to Payment Gateway. Smile
But only case step that to send credit card info to gateway, it have to send request from browser directly.
But now,I check to gateway, it have JS library to use send this case and I test it already. It’s work!
Seem, no command of Delphi for this case, So I must to use JS instead? Sad

Thanks
Reply
#6
If it can't go through your server and must come from the browser, then yes, the only language that the browser executes is JavaScript,nothing else.

however, you can have help from IW code and your Delphi code and craft the request in your server, send it to be executed on the browser.

I'll see if I can create something simple for you showing how the basics work, but it will be far from complete for your specific case. The token exchange sequence used in general by these servers can be way more complicated.
Reply
#7
(01-17-2024, 04:46 AM)Alexandre Machado Wrote: If it can't go through your server and must come from the browser, then yes, the only language that the browser executes is JavaScript,nothing else.

however, you can have help from IW code and your Delphi code and craft the request in your server, send it to be executed on the browser.

I'll see if I can create something simple for you showing how the basics work, but it will be far from complete for your specific case. The token exchange sequence used in general by these servers can be way more complicated.

Smile Now I solve the problem with JS that Gateway recommends, their library is prepared to support it.

But if you have any further advice, I'd really appreciate it.

Thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)