achertovsky/paypal-yii2

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (dev-master) of this package.

Makes paypal for yii2 much easier

dev-master 2017-10-12 11:51 UTC

This package is auto-updated.

Last update: 2022-06-19 19:49:08 UTC


README

Description

Module for easy yii2 payments

Features:
Express payment
Subscription (via express payment)

I hope it will be useful for you.

Installing

The preferred way to install this extension is through composer.

{
	"require": {
	    "achertovsky/paypal-yii2": "@dev"
    }
}

or

	composer require achertovsky/paypal-yii2 "@dev"

update your db schema

php yii migrate/up --migrationPath=@vendor/achertovsky/paypal-yii2/migrations

Usage

Currently application is in sandbox. You can edit values in DB or using GUI in backend (if you have backend configured)

to start using it - please, add it to your modules section

you can use your attribute names.

fox example:

'payment' => [
    'class' => 'achertovsky\paypal\Module',
],

EXPRESS PAYMENT HOW TO
SUBSCRIPTION VIA EXPRESS PAYMENT HOW TO

Configuration variables listing

	//here is arrays like for Url::toRoute()
    public $ipnUrl = ['/payment/payment/payment-notification'];
    public $expressSuccessUrl = ['/payment/payment/express-payment'];
    public $subscriptionExpressSuccessUrl = ['/payment/payment/subscription-express-confirm'];
    public $cancelUrl = ['/', '#' => 'cancel'];
    //default currency
    public $currency = 'USD';
    //models for this module
    public $modelMap = [
        'PaypalExpressPayment' => 'achertovsky\paypal\models\PaypalExpressPayment',
        'PaypalSubscriptionExpress' => 'achertovsky\paypal\models\PaypalSubscriptionExpress',
    ];
    //paypal express checkout version
    public $ECVersion = '104.0';
    //boolean which indicates is express payment is enabled in app
    public $enableExpressPayment = true;
    //boolean which indicates is subscription flow is enabled in app
    public $enableSubscriptionExpress = true;

    //getter to receive users name. it must be assigned to your option
    public $subscriptionUsernameGetter = 'username';
    //defines if user receive notifications via email when subscription status changed
    public $subscriptionEmailNotification = false;