ระบบตัดบัตร TrueMoney ใช้ไฟล์ class ไฟล์เดียว ( TrueMoney Wallet ) ไม่ผ่านตัวกลางของใครทั้งนั้นเข้าตรงกระเป๋าเลยครับ
( PHP )
Update Code 9/6/2560
class TrueWallet{
public $username;
public $password;
private $passhash;
//Config TrueWallet ห้ามแก้ไขหากไม่รู้ค่าที่แท้จริง
private $login_type = "email";
private $api_signin = "https://api-ewm.truemoney.com/api/v1/signin?&";
private $api_profile = "https://api-ewm.truemoney.com/api/v1/profile/";
private $api_topup = "https://api-ewm.truemoney.com/api/api/v1/topup/mobile/";
private $device_os = "android";
private $device_id = "d520d0d12d0d48cb89394905168c6ed5";
private $device_type = "CPH1611";
private $device_version = "6.0.1";
private $app_name = "wallet";
private $app_version = "2.9.14";
private $deviceToken = "fUUbZJ9nwBk:APA91bHHgBBHhP9rqBEon_BtUNz3rLHQ-sYXnezA10PRSWQTwFpMvC9QiFzh-CqPsbWEd6x409ATC5RVsHAfk_-14cSqVdGzhn8iX2K_DiNHvpYfMMIzvFx_YWpYj5OaEzMyIPh3mgtx";
private $mobileTracking = "dJyFzn\/GIq7lrjv2RCsZbphpp0L\/W2+PsOTtOpg352mgWrt4XAEAAA==";
//End Config
public function __construct($user,$pass) {
$this->username = $user;
$this->password = $pass;
$this->passhash = sha1($user.$pass);
}
public function GetToken(){
$url = $this->api_signin.'device_os='.$this->device_os.'&device_id='.$this->device_id.'&device_type='.$this->device_type.'&device_version='.$this->device_version.'&app_name='.$this->app_name.'&app_version='.$this->app_version;
$header = array(
"Host: api-ewm.truemoney.com",
"Content-Type: application/json"
);
$postfield = array(
"username"=>$this->username,
"password"=>$this->passhash,
"type"=>$this->login_type,
"deviceToken"=>$this->deviceToken,
"mobileTracking"=>$this->mobileTracking,
);
$data_string = json_encode($postfield);
return $this->wallet_curl($url,$data_string,$header);
}
public function Profile($token){
$url = $this->api_profile.$token.'?&device_os=android&device_id='.$this->device_id.'&device_type='.$this->device_type.'&device_version='.$this->device_version.'&app_name='.$this->app_name.'&app_version='.$this->app_version;
$header = array("Host: api-ewm.truemoney.com");
return $this->wallet_curl($url,false,$header);
}
public function Topup($cashcard,$token){
$url = $this->api_topup.time()."/".$token."/cashcard/".$cashcard;
$header = array("Host: api-ewm.truemoney.com");
return $this->wallet_curl($url,true,$header);
}
private function wallet_curl($url,$data,$header){
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_HTTPHEADER,$header);
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,false);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);
if($data){
curl_setopt($ch,CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch,CURLOPT_POSTFIELDS, $data);
}
curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_USERAGENT,'');
$result = curl_exec($ch);
return $result;
}
}
$wallet = new TrueWallet('YOUR EMAIL','YOUR PASSWORD');
$token = json_decode($wallet->GetToken(),true)['data']['accessToken'];
$profile = $wallet->Profile($token);
$topup = $wallet->Topup('เลขบบัตรทรูมั่นนี่',$token);
Download
https://github.com/exzajung/class.truewallet.php 
ทดสอบได้ที่
https://www.xindy.in/truewallet 
เข้าตรวจสอบผ่านเว็บ
https://wallet.truemoney.com/ 
หรือจะเช็คที่แอพก็ได้นะครับ
เพิ่มเติม
https://github.com/xeleniumz/TrueWallet 
TrueWallet
TrueWallet library For Node.js
PHP Version & Credit
visit this repository for php version
https://github.com/exzajung/class.truewallet.php 
System requirement
babel transpiler
node.js version 7.10 or higher
request-promise-native Simplified HTTP request client for node.js package
moment time management time management for node.js package
How to use
install require package
import this library to your controller
send request data with post to endpoint and Enjoy !!
Debugging
There are at least three ways to debug the operation of request: Launch the node process like NODE_DEBUG=request node script.js (lib,request,otherlib works too). Set require('request').debug = true at any time Use the request-debug module to view request and response headers and bodies.