Download the PHP package kitlabs/kit-pay-bundle without Composer

On this page you can find all versions of the php package kitlabs/kit-pay-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package kit-pay-bundle

KitPayBundle

Symfony wrapper for payment.
The KitPayBundle provides a simple integration for your Symfony project.

Installation

Step 1: Download the Bundle


Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

$ composer require kitlabs/kit-pay-bundle

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Step 2: Enable the Bundle


Then, enable the bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new Kit\Bundle\PayBundle\KitPayBundle(),
        );

        // ...
    }

    // ...
}

Step 3: Configuration

# config.yml
kit_pay:
    config:
        alipay:
            use_sandbox: true
            partner: 20888xxxxxx  #收款支付宝用户ID
            app_id: 2014072xxxxxxx # 支付宝分配给开发者的应用ID
            sign_type: RSA2 # RSA or RSA2
            ali_public_key: '%kernel.root_dir%/alipay/alipay_public_key_sha256.txt' # path or content(app/alipay/alipay_public_key_sha256.txt)
            rsa_private_key: '%kernel.root_dir%/alipay/rsa_private_key_2048.txt' # path or content(app/alipay/rsa_private_key_2048.txt)
            limit_pay: ['creditCard']
            notify_url: http://kitlabs.cn/notify
            return_url: http://kitlabs.cn/return
            return_raw: true # 异步回调是否显示原始数据
        weipay:
            use_sandbox: true
            app_id: wx47xxxxxxx # appid是微信公众账号或开放平台APP的唯一标识
            mch_id: 148xxxxxx # 商户收款账号
            md5_key: de95341c9xxxxxx # API密钥
            app_cert_pem: '%kernel.root_dir%/cert/apiclient_cert.pem' # app/cert/apiclient_cert.pem
            app_key_pem: '%kernel.root_dir%/cert/apiclient_key.pem'  # app/cert/apiclient_key.pem
            sign_type: MD5  # MD5 or HMAC-SHA256
            limit_pay: ['no_credit']
            fee_type: CNY
            notify_url: http://kitlabs.cn/notify
            redirect_url: http://kitlabs.cn/return
            return_raw: true # 异步回调是否显示原始数据

Read the payment configure documentation

Usage

//paytype and channel
$types = [
        'alipay' => [
            'ali_app', // 支付宝app支付
            'ali_wap', // 支付宝H5支付
            'ali_web', // 支付宝电脑网站支付
            'ali_qr', // 支付宝当面付:扫码支付
            'ali_bar' // 支付宝当面付:条码支付
        ],
        'weipay' => [
            'wx_app', // 微信app支付
            'wx_pub', // 微信公众号支付
            'wx_qr', // 微信扫码支付
            'wx_bar', // 微信刷卡支付
            'wx_lite', // 微信小程序支付
            'wx_wap' // 微信H5支付
        ],
        'cmbpay' => [
            'cmb_app', // 招商一网通app支付
            'cmb_wap' // 招商H5支付
        ]
    ];

/**
 * @var \Kit\Bundle\PayBundle\Service\PaymentService $paymentService
 */
$paymentService = $this->get('kit_pay.payment_service');
$paymentService->run($channel, $paytype,  $metadata); // $channel one of "alipay","weipay"

// 不使用默认配置的商户号支付,添加额外商户号支付
$paymentService->run($channel, $paytype,  $metadata,$config); // $config为配置的数组

All versions of kit-pay-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
lcp0578/payment Version ^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kitlabs/kit-pay-bundle contains the following files

Loading the files please wait ....