Skip to content

Latest commit

 

History

History
83 lines (50 loc) · 2.18 KB

README_en.md

File metadata and controls

83 lines (50 loc) · 2.18 KB

PHP SDK for SaaSus Platform

Japanese page is here.


Preparing to use the SDK

Set Up

composer config repositories.saasus-platform/saasus-sdk-php vcs https://github.com/saasus-platform/saasus-sdk-php

Added SDK

composer require saasus-platform/saasus-sdk-php

Define Environment Variables

### for SaaSus Platform
SAASUS_SAAS_ID="(SaaS ID on Screen)"
SAASUS_API_KEY="(API KEY on Screen)"
SAASUS_SECRET_KEY="(Client Secret on Screen)"
SAASUS_LOGIN_URL="https://auth.sample.saasus.jp/ (Login Screen URL)"

SAASUS_SAAS_ID, SAASUS_API_KEY, SAASUS_SECRET_KEY are the SaaS ID, API key and client secret displayed on the SaaS development console screen, SAASUS_LOGIN_URL sets the URL of the login screen created in the SaaS development console.

Incorporating the authentication module

api/routes/web.php

// Use Auth Middleware of SaaSus SDK standard
Route::middleware(\AntiPatternInc\Saasus\Laravel\Middleware\Auth::class)->group(function () {
    // Write your own logic

    Route::redirect('/', '/xxxxxx');
});

PHP SDK

  • Auth

    It is used for referencing/updating user information, basic information, authentication information, tenant information, role information, etc.

  • Pricing

    It is used to refer to and update information related to charges, such as pricing units, function menus, charge plans, and metering unit counts.

  • Billing

    It is used for referencing/updating information related to external SaaS used in billing operations.

  • Integration

    It is used for referencing/updating information related to Amazon EventBridge.

  • AwsMarketplace

    It is used for referencing/updating information related to AWS Marketplace.

  • Communication

    It is used to create a responsive platform for handling user feedback.

  • ApiLog

    It is used to check the log history when executing the API provided by SaaSus Platform.


Use Case Sample

In Preparation···