Skip to content
This repository was archived by the owner on Mar 9, 2019. It is now read-only.

thisisryian/satuh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

satuh

Satuh Library For PHP

Description

Satuh Libarry enables you to work with Satuh APIs such as Satuh Authentication, Satuh SMS, Satuh Notification, Satuh PLN, Satuh Voucher Game, or Satuh Pulsa

Requirements

Installation

Install this libary through composer.

composer require pmb/satuh:^0.3.3.1

Usage

satuh\auth

satuh\auth is authentication to access our lib. Also to grant our Satuh User information, which you can access it for your login application.

Basic Example

<?php
use satuh\auth;

$satuh = new auth("CLIENT_ID","CLIENT_SECRET","CLIENT_REDIRECT_URI");
$satuh->authorize('code'); //this action will give you an authenticaion code in your CLIENT_REDIRECT_URI
//under your redirect uri;

$code = $_GET['code'];
$satuh->setOauthCode($code);
$accessToken = $satuh->getAccessToken('authorization_code');
$user = $satuh->getUserData($accessToken['access_token']);
print_r($user);

Client Credential

Only Cooperate Vendor could use this.

satuh\pulsa

Basic Examples

<?php 
use satuh\pulsa;

$pulsa = new pulsa("CLIENT_ID","CLIENT_SECRET","ENVIRONMENT");

satuh\pln

Basic Examples

<?php 
use satuh\pln;

$pln = new pln("CLIENT_ID","CLIENT_SECRET","ENVIRONMENT");

satuh\game

Basic Examples

<?php 
use satuh\game;

$game = new game("CLIENT_ID","CLIENT_SECRET","ENVIRONMENT");

More Information

For more information, see the official [API documents]. If it's your first time using this library, we recommend taking a look at our official [API documents]

End Of Client Credential

Part Of Satuh

satuh\sms

Basic Examples

<?php 
use satuh\sms;

$sms = new sms("USERNAME","PASSWORD","ENVIRONMENT");
$reponse = $sms->send_sms("phone","message",true)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages