Skip to content

Additional Subscriptions info required? #21

Answered by imdhemy
HilalLko asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @hilal-hipster,
Thank you for creating this topic.
Getting the subscription info is related to the context and the subscription provider.

From a purchase event:

$subscription = $event->getSubscription()->getProviderRepresentation();

The getProviderRepresentation() method returns either SubscriptionPurchase object or ReceiptResponse object based on the provider. The first object represents the Resource: SubscriptionPurchase from Google, and the later object represents the responseBody from App Store.

Each key has a getter method, for example, kind has a getter method getKind(), and so on.

Using The Subscription Facade:

Check the following sections in the main documentation

Replies: 4 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@HilalLko
Comment options

Answer selected by imdhemy
Comment options

You must be logged in to vote
3 replies
@imdhemy
Comment options

@HilalLko
Comment options

@HilalLko
Comment options

Comment options

You must be logged in to vote
2 replies
@imdhemy
Comment options

@batusenyuz
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants