Skip to content

Commit

Permalink
Adding webhook for Apple's ServerToServerNotifications processing
Browse files Browse the repository at this point in the history
- Processor checks and renews Apple subscription based on the
received notification.
- Since there's no way how to pass user-related data to payment
payload, user is matched against original transaction ID that
should be stored in payment_meta. Module expects app to call
an internal API that sets this meta value for selected user.
- Receipt validation was also added to internal
`verify-purchase` API handler.
  • Loading branch information
markoph authored and rootpd committed Jun 29, 2020
1 parent 4865e74 commit a69f40a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/model/Repositories/PaymentMetaRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ final public function findByMeta(string $key, string $value)
])->fetch();
}

final public function findAllByMeta(string $key, string $value)
{
return $this->getTable()->where([
'key' => $key,
'value' => $value
])
->order('id DESC')
->fetchAll();
}

/**
* @param ActiveRow $payment
* @param string $key
Expand Down

0 comments on commit a69f40a

Please sign in to comment.