承接 midwesterninteractive/laravel-sagepayments 相关项目开发

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

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

midwesterninteractive/laravel-sagepayments

Composer 安装命令:

composer require midwesterninteractive/laravel-sagepayments

包简介

Laravel SagePayments

README 文档

README

PHP SDK for working with basic Sage Payment Bankcard methods.

For more information visit Sage Payments

Installation

$ composer require midwesterninteractive/laravel-sagepayments
$ php artisan vendor:publish --tag=config

Configuration

You may modify the config file that is published config/sagepayments.php and provide the default options or add the following to your .env file:

# Merchant/Client
SAGE_MERCH_ID=[sage-client-id]
SAGE_MERCH_KEY=[sage-client-key]

# Sage App
SAGE_APP_ID=[sage-app-id]
SAGE_APP_KEY=[sage-app-key]

You'll need to get the Sage Merch creds from your client or login to your Sage Portal. You may also request that Sage set up a test client for development.

For your Sage App creds you'll need to login to your developer account and grab them from your exisiting application or create a new one.

Service Provider

If you're on laravel 5.5 the service provider will be automatially loaded, if not, add to your config/app.php providers

'providers' => [
    // ...
    MidwesternInteractive\Laravel\SagePaymentsServiceProvider::class,
],

Usage

Use in class

use MidwesternInteractive\Laravel\SagePayments;

Create Charge

Utilizes post_charges for more information on available parameters visit the documentation

$data = [
    'retail' => [
        'amounts' => [
            'total' => 100
        ],
        'billing' => [
            'name' => 'John Smith',
            'address' => '123 Address Ave',
            'city' => 'City',
            'state' => 'ST',
            'postalCode' => '12345',
            'country' => 'US'
        ],
        'cardData' => [
            'number' => '5454545454545454',
            'expiration' => '0920',
            'cvv' => '987'
        ]
    ]
];
$type = 'Sale';

$response = SagePayments::create($data, $type);

Return Charges

Utilizes get_charges for more information on available parameters visit the documentation

$data = [
    'pageSize' => '20'
];

$response = SagePayments::charges($data);

Return Charge Details

Utilizes get_charges_detail for more information on available parameters visit the documentation

// Charge ID
$reference = '[charge-reference-id]';

$response = SagePayments::details($reference);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2017-09-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固