{"id":21601746,"url":"https://github.com/kitlabs-cn/kitpaybundle","last_synced_at":"2025-10-08T19:05:23.336Z","repository":{"id":57007090,"uuid":"96273645","full_name":"kitlabs-cn/KitPayBundle","owner":"kitlabs-cn","description":"weixin pay \u0026 alipay  symfony3","archived":false,"fork":false,"pushed_at":"2020-12-02T17:25:45.000Z","size":25,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-17T15:07:04.165Z","etag":null,"topics":["bundle","pay","payment","symfony"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kitlabs-cn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-05T03:35:40.000Z","updated_at":"2020-12-02T17:23:43.000Z","dependencies_parsed_at":"2022-08-21T12:40:30.902Z","dependency_job_id":null,"html_url":"https://github.com/kitlabs-cn/KitPayBundle","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/kitlabs-cn/KitPayBundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitlabs-cn%2FKitPayBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitlabs-cn%2FKitPayBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitlabs-cn%2FKitPayBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitlabs-cn%2FKitPayBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kitlabs-cn","download_url":"https://codeload.github.com/kitlabs-cn/KitPayBundle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitlabs-cn%2FKitPayBundle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000680,"owners_count":26082804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bundle","pay","payment","symfony"],"created_at":"2024-11-24T19:10:31.947Z","updated_at":"2025-10-08T19:05:23.300Z","avatar_url":"https://github.com/kitlabs-cn.png","language":"PHP","readme":"# KitPayBundle\nSymfony wrapper for [payment](https://github.com/helei112g/payment).  \nThe KitPayBundle provides a simple integration for your Symfony project.\n\n## Installation\n \n### Step 1: Download the Bundle\n---------------------------\n \nOpen a command console, enter your project directory and execute the\nfollowing command to download the latest stable version of this bundle:\n \n\t\n\t$ composer require kitlabs/kit-pay-bundle\n\n \nThis command requires you to have Composer installed globally, as explained\nin the [installation chapter](https://getcomposer.org/doc/00-intro.md)\nof the Composer documentation.\n \n### Step 2: Enable the Bundle\n---------------------------\n \nThen, enable the bundle by adding it to the list of registered bundles\nin the `app/AppKernel.php` file of your project:\n\n\t\u003c?php\n\t// app/AppKernel.php\n\t \n\t// ...\n\tclass AppKernel extends Kernel\n\t{\n\t    public function registerBundles()\n\t    {\n\t        $bundles = array(\n\t            // ...\n\t \n\t            new Kit\\Bundle\\PayBundle\\KitPayBundle(),\n\t        );\n\t \n\t        // ...\n\t    }\n\t \n\t    // ...\n\t}\n\n### Step 3: Configuration \n\n\t# config.yml\n\tkit_pay:\n\t    config:\n\t        alipay:\n\t            use_sandbox: true\n\t            partner: 20888xxxxxx  #收款支付宝用户ID\n\t            app_id: 2014072xxxxxxx # 支付宝分配给开发者的应用ID\n\t            sign_type: RSA2 # RSA or RSA2\n\t            ali_public_key: '%kernel.root_dir%/alipay/alipay_public_key_sha256.txt' # path or content(app/alipay/alipay_public_key_sha256.txt)\n\t            rsa_private_key: '%kernel.root_dir%/alipay/rsa_private_key_2048.txt' # path or content(app/alipay/rsa_private_key_2048.txt)\n\t            limit_pay: ['creditCard']\n\t            notify_url: http://kitlabs.cn/notify\n\t            return_url: http://kitlabs.cn/return\n\t            return_raw: true # 异步回调是否显示原始数据\n\t        weipay:\n\t            use_sandbox: true\n\t            app_id: wx47xxxxxxx # appid是微信公众账号或开放平台APP的唯一标识\n\t            mch_id: 148xxxxxx # 商户收款账号\n\t            md5_key: de95341c9xxxxxx # API密钥\n\t            app_cert_pem: '%kernel.root_dir%/cert/apiclient_cert.pem' # app/cert/apiclient_cert.pem\n\t            app_key_pem: '%kernel.root_dir%/cert/apiclient_key.pem'  # app/cert/apiclient_key.pem\n\t            sign_type: MD5  # MD5 or HMAC-SHA256\n\t            limit_pay: ['no_credit']\n\t            fee_type: CNY\n\t            notify_url: http://kitlabs.cn/notify\n\t            redirect_url: http://kitlabs.cn/return\n\t            return_raw: true # 异步回调是否显示原始数据\n\nRead the [payment configure documentation](https://helei112g1.gitbooks.io/payment-sdk/content/ji-chu-pei-zhi.html)\n## Usage\n\n\t//paytype and channel\n\t$types = [\n            'alipay' =\u003e [\n                'ali_app', // 支付宝app支付\n                'ali_wap', // 支付宝H5支付\n                'ali_web', // 支付宝电脑网站支付\n                'ali_qr', // 支付宝当面付：扫码支付\n                'ali_bar' // 支付宝当面付：条码支付\n            ],\n            'weipay' =\u003e [\n                'wx_app', // 微信app支付\n                'wx_pub', // 微信公众号支付\n                'wx_qr', // 微信扫码支付\n                'wx_bar', // 微信刷卡支付\n                'wx_lite', // 微信小程序支付\n                'wx_wap' // 微信H5支付\n            ],\n            'cmbpay' =\u003e [\n                'cmb_app', // 招商一网通app支付\n                'cmb_wap' // 招商H5支付\n            ]\n        ];\n\r\n\t/**\r\n     * @var \\Kit\\Bundle\\PayBundle\\Service\\PaymentService $paymentService\r\n     */\r\n    $paymentService = $this-\u003eget('kit_pay.payment_service');\r\n    $paymentService-\u003erun($channel, $paytype,  $metadata); // $channel one of \"alipay\",\"weipay\"\r\n\r\n\t// 不使用默认配置的商户号支付，添加额外商户号支付\r\n\t$paymentService-\u003erun($channel, $paytype,  $metadata，$config); // $config为配置的数组\r\n\t\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitlabs-cn%2Fkitpaybundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkitlabs-cn%2Fkitpaybundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitlabs-cn%2Fkitpaybundle/lists"}