vendor/codeages/biz-order-pay/src/Pay/PayServiceProvider.php

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php

namespace Codeages\Biz\Pay;

use Codeages\Biz\Pay\Status\PayTradeContext;
use Pimple\Container;
use Pimple\ServiceProviderInterface;
use Codeages\Biz\Pay\Payment\SignatureToolkit;

class PayServiceProvider implements ServiceProviderInterface
{
    public function register(Container $biz)
    {
        $biz['migration.directories'][] = dirname(dirname(__DIR__)).'/migrations/pay';
        $biz['autoload.aliases']['Pay'] = 'Codeages\Biz\Pay';

        $biz['payment.options'] = null;

        $biz['payment.final_options'] = function () use ($biz) {
            $options = array(
                'closed_by_notify' => false,
                'refunded_by_notify' => false,
                'coin_rate' => 1,
                'goods_title' => '',
            );

            if (!empty($biz['payment.options'])) {
                $options = array_merge($options, $biz['payment.options']);
            }

            return $options;
        };

        $biz['console.commands'][] = function () use ($biz) {
            return new \Codeages\Biz\Pay\Command\TableCommand($biz);
        };

        $this->registerStatus($biz);
        $this->registerPayments($biz);
    }

    protected function registerPayments($biz)
    {
        $paymentDefaultPlatforms = array(
            'wechat' => array(
                'class' => '\Codeages\Biz\Pay\Payment\WechatGateway',
                'appid' => '',
                'mch_id' => '',
                'key' => '',
                'cert_path' => '',
                'key_path' => '',
            ),
            'alipay' => array(
                'class' => '\Codeages\Biz\Pay\Payment\AlipayGateway',
                'seller_email' => '',
                'partner' => '',
                'key' => '',
            ),
            'iap' => array(
                'class' => '\Codeages\Biz\Pay\Payment\IapGateway',

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。