承接 dash8x/rm-laravel 相关项目开发

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

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

dash8x/rm-laravel

Composer 安装命令:

composer require dash8x/rm-laravel

包简介

Laravel wrapper for Revenue Monster PHP SDK

README 文档

README

Latest Version on Packagist Test Status Code Coverage Badge Total Downloads

Laravel wrapper for Revenue Monster PHP SDK.

Installation

You can install the package via composer:

composer require dash8x/rm-laravel

Optionally you can use the Facade for shorter code. Add this to your facades:

'RevenueMonster' => Dash8x\RevenueMonster\Facades\RevenueMonsterFacade::class;

Setting up the Revenue Monster credentials

Add your Revenue Monster Client ID and Client Secret to your config/services.php. You can refer to how to create the API Client from the Official Revenue Monster Documentation.

Make sure to add the private key file to gitignore if you've it in the project directory.

// config/services.php
...
'rm' => [
    'client_id' => env('RM_CLIENT_ID'), // Client ID 
    'client_secret' => env('RM_CLIENT_SECRET'), // Client Secret
    'sandbox' => env('RM_SANDBOX', false), // Whether to use the sandbox mode
    'private_key' => base_path('/rm-private-key.pem'), // Path to the private key file                           
],
...

Usage

Using the App container:

$rm = App::make('rm');

// Get merchant profile
try {
  $response = $rm->merchant->profile();
} catch(ApiException $e) {
  echo "statusCode : {$e->getCode()}, errorCode : {$e->getErrorCode()}, errorMessage : {$e->getMessage()}";
} catch(Exception $e) {
  echo $e->getMessage();
}

Using the Facade

// Get merchant profile
try {
  $response = RevenueMonster::merchant()->profile();
} catch(ApiException $e) {
  echo "statusCode : {$e->getCode()}, errorCode : {$e->getErrorCode()}, errorMessage : {$e->getMessage()}";
} catch(Exception $e) {
  echo $e->getMessage();
}

Available Methods

Refer to the readme for the Official PHP SDK.

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email contact@arushad.org instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-10-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固