承接 michalpicpauer/payum-braintree 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

michalpicpauer/payum-braintree

Composer 安装命令:

composer require michalpicpauer/payum-braintree

包简介

A Payum extension for Braintree gateway integration

README 文档

README

A Payum extension for Braintree gateway integration

Configuration

Register a gateway factory to the payum's builder and create a gateway:

<?php

use Payum\Core\PayumBuilder;

$defaultConfig = [];

$payum = (new PayumBuilder)
    ->addGatewayFactory('braintree', new Payum\Braintree\BraintreeGatewayFactory($defaultConfig))

    ->addGateway('braintree', [
        'factory' => 'braintree',
        'sandbox' => true,
        'merchantId' => '123123',
        'publicKey' => '999999',
        'privateKey' => '777888',
    ])

    ->getPayum()
;

Or, if your are working on the bases of Symfony, you can define it in a service that way :

    acme.braintree_gateway_factory:
        class: Payum\Core\Bridge\Symfony\Builder\GatewayFactoryBuilder
        arguments: [Payum\Braintree\BraintreeGatewayFactory]
        tags:
            - { name: payum.gateway_factory_builder, factory: braintree }

and in config.yml

payum:
    gateways:
        braintree:
            factory: braintree
            payum.http_client: '@payum.http_client'
            merchantId: 123123
            publicKey: 999999
            privateKey: 777888

Using the gateway:

<?php

use Payum\Core\Request\Capture;

/** @var \Payum\Core\Payum $payum */
$paypal = $payum->getGateway('braintree');

$model = new \ArrayObject([
  // ...
]);

$paypal->execute(new Capture($model));

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-01-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固