V
V
VitaliyBorys2018-06-18 13:41:03
PayPal
VitaliyBorys, 2018-06-18 13:41:03

Payment system on the site?

Hello. There is a site that sells anything. But the user pays for the products through another site.
That is, there is a site mysite.com on which the user buys a product, when he clicks to pay, he is transferred to mysite1.com. And from mysite1.com already on paypal. after successful payment, paypapl will return a successful response to mysite1.com.
How does mysite.com know about a successful payment?
I thought when it will relink from mysite.com to mysite1.com , pass another GET url parameter to which mysite1.com will relink in case of successful payment. Well, the user can see this link in the ulr address, it's stupid not to go to it, and it turns out that the order is marked as paid. How to proceed ?
Mandatory conditions of payment must be on another site.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
D3lphi, 2018-06-18
@VitaliyBorys

So that the user does not use any url for personal gain, all request parameters are hashed using a secret key that only the payment service (mysite1.com) and the client service (mysite.com) have. When a request occurs, the hash is recalculated and checked against the one that came in the request. If you try to change the parameter values ​​in every possible way, the checksums will not match.

Y
Yan-s, 2018-06-18
@Yan-s

mysite1.com should send a successful payment message to mysite.com. It can do this behind the scenes, for this mysite.com must provide the corresponding API. Or it can send data in get parameters when redirecting the user, but in encrypted form.

A
Adamos, 2018-06-18
@Adamos

Yes, you can just sell access keys to the first one on the second site.
But this scheme smacks of something, and Palka has a trained flair for such a smell ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question