E
E
EVOSandru62020-11-10 13:05:58
Google
EVOSandru6, 2020-11-10 13:05:58

How to securely deliver data on the status of a payment made in google pay from the client to the server?

Hey guys, has anyone made a google pay payment?
In particular, I am interested in the method of obtaining information about the payment on the server.

Surprisingly, I did not find the opportunity to set entrypoints on the server,
to which the Google service goes, depending on the status of the payment made on the client device.

A la:

/ success
/ error
/ check
(such as where hashes are somehow checked and the honesty of the payment is verified)

I watched the office. connection dock.

There, on the diagram, the path is drawn with an arrow ( MyStore backend )
But this is after the payment has been made.
In my opinion, this is not very safe if the success request is sent directly from the client to the server.
Mb. Is there a way to get payment data via API ?

For example, send some identifier of a successful payment from the client to the server, or something else in addition to the completion of the payment.
And from the server to throw a request somewhere in the Google API and read its status?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2020-11-10
@EVOSandru6

And from the server to throw a request somewhere in the Google API and read its status?

That's how it's done.
The client processes the payment, sends its data to the server (this is already AFTER the payment on the client with Google has passed), the server validates this payment (in my opinion, the signature is being verified there), and tells the client that the payment is really ok.
Read for example here https://stackoverflow.com/questions/33850864/how-t...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question