承接 nug01/molare 相关项目开发

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

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

nug01/molare

Composer 安装命令:

composer require nug01/molare

包简介

This package helps in fastspring subscriptions

README 文档

README

NUG01 Molare is a Laravel package that simplifies the integration of FastSpring subscriptions into your Laravel application. It provides a convenient set of controllers and helper functions to manage subscriptions.

Installation

You can install the package via Composer by running the following command:

composer require nug01/molare:dev-master

Environment

Add the fastspring secret key in .env like this:

FASTSPRING_TOKEN={YOUR_FASTSPRING_SECRET_KEY}

Publishing

Next, publish the package's configuration file, If you want:

php artisan vendor:publish --provider="NUG01\Molare\MolareServiceProvider" --tag="config"molare:dev-master

Usage

Setup

Add the following credentials to your .env file:

FASTSPRING_USERNAME=your_fastspring_username
FASTSPRING_PASSWORD=your_fastspring_password
Account: Get an account.

```sh
use App\Services\FastSpringService;
// ...

$service = new FastSpringService();
$response = $service->getAccount($account_id);
return response()->json(['data' => $response['data'], 'result' => $response['result']]);

Management URL: Get the management URL for an account.

use App\Services\FastSpringService;

// ...

$service = new FastSpringService();
$response = $service->getManagementUrl($account_id);
return response()->json(['data' => $response['data'], 'result' => $response['result']]);

Subscription: Get subscription details.

use App\Services\FastSpringService;

// ...

$service = new FastSpringService();
$response = $service->getSubscription($subscription_id);
return response()->json(['data' => $response['data'], 'result' => $response['result']]);

Update Account: Update account details.

use App\Services\FastSpringService;
use Illuminate\Http\Request;

// ...

$service = new FastSpringService();
$response = $service->updateAccount($account_id, $request);
return response()->json(['data' => $response['data'], 'result' => $response['result']]);

Pause Subscription: Pause a subscription.

use App\Services\FastSpringService;

// ...

$service = new FastSpringService();
$response = $service->pauseSubscription($subscription_id, 1); // Adjust period count as needed
return response()->json(['data' => $response['data'], 'result' => $response['result']]);

Resume Subscription: Resume a paused subscription.

use App\Services\FastSpringService;

// ...

$service = new FastSpringService();
$response = $service->resumeSubscription($subscription_id);
return response()->json(['data' => $response['data'], 'result' => $response['result']]);

Configuration

You can configure the package by modifying the config/fastspring.php file. This file allows you to set various options related to the FastSpring integration and subscription management. Support

Support

If you encounter any issues or need assistance, please open an issue on GitHub. License

License

This package is open-source software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-07