ios — Как определить покупку Apple расходных материалов на стороне сервера (PHP)

У меня есть простой API-интерфейс на моем сервере, где я получаю информацию об inApps из клиентских приложений iOS.

Я проверяю квитанцию ​​от APNC и пытаюсь определить, какой продукт был куплен. Но я не понимаю, как это сделать ..

Я получаю что-то вроде этого:

... -- common info about request
[in_app] => Array
[0] => Array
(
[quantity] => 1
[product_id] => sp100
[transaction_id] => 1000000175969407
[original_transaction_id] => 1000000175969407
[purchase_date] => 2015-10-15 14:08:31 Etc/GMT
[purchase_date_ms] => 1444918111000
[purchase_date_pst] => 2015-10-15 07:08:31 America/Los_Angeles
[original_purchase_date] => 2015-10-15 14:08:31 Etc/GMT
[original_purchase_date_ms] => 1444918111000
[original_purchase_date_pst] => 2015-10-15 07:08:31 America/Los_Angeles
[is_trial_period] => false
)

[1] => Array
(
[quantity] => 1
[product_id] => sp100
[transaction_id] => 1000000176387075
[original_transaction_id] => 1000000176387075
[purchase_date] => 2015-10-19 11:26:48 Etc/GMT
[purchase_date_ms] => 1445254008000
[purchase_date_pst] => 2015-10-19 04:26:48 America/Los_Angeles
[original_purchase_date] => 2015-10-19 11:26:48 Etc/GMT
[original_purchase_date_ms] => 1445254008000
[original_purchase_date_pst] => 2015-10-19 04:26:48 America/Los_Angeles
[is_trial_period] => false
)

[2] => Array
(
[quantity] => 1
[product_id] => sp100
[transaction_id] => 1000000177517396
[original_transaction_id] => 1000000177517396
[purchase_date] => 2015-10-27 12:46:44 Etc/GMT
[purchase_date_ms] => 1445950004000
[purchase_date_pst] => 2015-10-27 05:46:44 America/Los_Angeles
[original_purchase_date] => 2015-10-27 12:46:44 Etc/GMT
[original_purchase_date_ms] => 1445950004000
[original_purchase_date_pst] => 2015-10-27 05:46:44 America/Los_Angeles
[is_trial_period] => false
)

[3] => Array
(
[quantity] => 1
[product_id] => sp200
[transaction_id] => 1000000176387194
[original_transaction_id] => 1000000176387194
[purchase_date] => 2015-10-19 11:27:15 Etc/GMT
[purchase_date_ms] => 1445254035000
[purchase_date_pst] => 2015-10-19 04:27:15 America/Los_Angeles
[original_purchase_date] => 2015-10-19 11:27:15 Etc/GMT
[original_purchase_date_ms] => 1445254035000
[original_purchase_date_pst] => 2015-10-19 04:27:15 America/Los_Angeles
[is_trial_period] => false
)

[4] => Array
(
[quantity] => 1
[product_id] => sp200
[transaction_id] => 1000000176387495
[original_transaction_id] => 1000000176387495
[purchase_date] => 2015-10-19 11:30:18 Etc/GMT
[purchase_date_ms] => 1445254218000
[purchase_date_pst] => 2015-10-19 04:30:18 America/Los_Angeles
[original_purchase_date] => 2015-10-19 11:30:18 Etc/GMT
[original_purchase_date_ms] => 1445254218000
[original_purchase_date_pst] => 2015-10-19 04:30:18 America/Los_Angeles
[is_trial_period] => false
)

[5] => Array
(
[quantity] => 1
[product_id] => sp200
[transaction_id] => 1000000178496582
[original_transaction_id] => 1000000178496582
[purchase_date] => 2015-11-03 11:11:05 Etc/GMT
[purchase_date_ms] => 1446549065000
[purchase_date_pst] => 2015-11-03 03:11:05 America/Los_Angeles
[original_purchase_date] => 2015-11-03 11:11:05 Etc/GMT
[original_purchase_date_ms] => 1446549065000
[original_purchase_date_pst] => 2015-11-03 03:11:05 America/Los_Angeles
[is_trial_period] => false
)

)

И вопрос, как определить, какой продукт был приобретен пользователем?

0

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы [email protected]