此包已被弃用且不再维护。未建议替代包。
关于此包最新版本(dev-master)没有可用的许可信息。

使yii2的bluesnap实现更加简单

dev-master 2021-12-18 12:33 UTC

This package is auto-updated.

Last update: 2022-06-18 13:33:36 UTC


README

你好,陌生人。

此模块是为那些想使用BlueSnap且尽可能少写代码的人设计的。希望你会喜欢它。
请随时与我联系并报告问题。

最好的祝愿,
Alexander Chertovsky

安装手册

1

在内部配置make

return [
    'modules' => [
        'bluesnap' => [
            'class' => 'achertovsky\bluesnap\Module',
            'defaultStoreId' => 'fillme',
            'clientSideEncryptionKey' => 'fillme',
            'username' => 'fillme',
            'password' => 'fillme',
            // OR
            // code below is instruction how to fill 'authToken' field. Refer https://developers.bluesnap.com/docs/authentication
            // (module gonna do same if u provide username and pwd instead)
            // $encodedString = 'Basic '.base64_encode('username:password');
            // 'authToken' => $encodedString;
            'antiFraudSalt' => 'some word/phrase/anything that u want to use. it gonna be used to generate anti-fraud token. make sure only u and trusted people know it :)',
            'sellerId' => 'fillme',
            'dataProtectionKey' => 'fillme', //set it only if you want to use "Require Notification Receipt". Otherwise it wont be used
            'backToSellerUrl' => 'http://yoursite.com/thankyoupage',
        ],
    ],
    'components' => [
        'bluesnap' => [
            'class' => 'achertovsky\bluesnap\Bluesnap',
        ],
    ],
];

2

运行以下手册 https://support.bluesnap.com/page/setting-up-your-data-protection-key-1
警告 假设更改后,您将无法解密已加密的参数。

3

根据此手册配置您的IPN URL https://support.bluesnap.com/docs/ipn-setup

4 (可选)

为了支持paypal,请运行以下链接: https://support.bluesnap.com/docs/connecting-paypal-and-bluesnap 支持paypal订阅: https://support.bluesnap.com/docs/enabling-subscriptions-with-paypal

使用示例

请查看wiki以获取使用示例。