E
E
EVOSandru62020-11-12 12:52:13
1C-Bitrix
EVOSandru6, 2020-11-12 12:52:13

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

Hey guys, has anyone made an apple 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. But I did not find a way to receive payment data through the API.

MB, for example, you can transfer some identifier of a successful payment from the client to the server, or something else in addition upon completion of the payment.
And from the server to throw a request somewhere in the Google API and read its status?

For example, by analogy, google pay has a section that covers the task.
https://developers.google.com/android-publisher/ap...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya S, 2020-11-12
@EVOSandru6

Do you need Apple Pay or Google Pay? For some reason, everything is mixed up in the question.
We implemented Apple Pay payments according to the following scheme:
1. Payment is completely made on the side of the application. Backend is not involved in any way.
2. Then the application informs the backend about the successful purchase by sending a receipt (receipt)
3. The backend checks the received receipt using the verifyReceipt API and then credits the purchase and takes the necessary actions.
It is important to remember that a receipt can contain several transactions, incl. those that have been processed previously. You need to store the IDs of processed transactions somewhere in the database and process only new ones.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question