whalew/iap-component

In app Purchase component for yii2. Need for verify your purchases in Itusnes-server

dev-master 2019-02-22 16:01 UTC

This package is auto-updated.

Last update: 2024-03-23 02:50:21 UTC


README

Yii2 In app Purchase Component.

Installation composer require "linnoxlewis/Iap-component"

Basic Configuration Once the extension is installed, simply modify your application configuration as follows:

use linnoxlewis\iap\IapComponent;

return [ 'components' => [ // ... 'iap-component' => [ 'class' => IapComponent::class, 'sandbox' => true !== YII_ENV_PROD, 'sandboxUrl' =>'https://sandbox.itunes.apple.com/verifyReceipt', 'buyUrl' => 'https://buy.itunes.apple.com/verifyReceipt', 'password' => '', ] ], ]

How to Use :

$verify = Yii::$app->get('iap-component');

$verify->verify($receipt);