Git Product home page Git Product logo

class-truewallet-php's Introduction

Truemoney Wallet Class

  • สำคัญมากๆจำเป็นต้อง Cronjob มาที่ access_token.php ตลอดเวลา เพื่อทำให้ access_token ไม่ตาย !

Variable

  • $phone // เบอร์ทรูมันนี่วอลเลท
  • $password // รหัสผ่านทรูมันนี่วอลเลท
  • $otp_code // OTP ใน SMS 6 หลัก (ตัวเลข)
  • $otp_ref // OTP ใน SMS REF 4 หลัก (ตัวอักษร)
  • $access_token // ได้จาก SubmitLoginOTP

Example Truemoney Wallet Class

<?php
  require "Truewallet.php";
  $tw = new TrueWalletClass($phone, $password);
  
  print_r($tw->RequestLoginOTP());
  print_r($tw->SubmitLoginOTP($otp_code, $phone, $otp_ref));
  
  $tw->setAccessToken($access_token);
  $data = $tw->GetTransaction();
  foreach ($data["data"]["activities"] as $transfer) {
    $values = $tw->GetTransactionReport($transfer["report_id"]);
    print_r($values);
  }
?>

Check Get Money

หากต้องการเช็คว่ารายการได้เป็นการโอนผ่าน ทรูมันนี่วอลเลท ให้ใช้ If

  • $transfer["original_type"] == "transfer" //โอนผ่านเเอพทรูมันนี่วอลเลท
  • $transfer["original_action"] == "creditor" //เช็คว่าเป็นรายการโอนเข้ารายการที่เราโอนออกจากบัญชีจะไม่เเสดงครับ

GetTransaction Value

  • $transfer_id //เลขอ้างอิง
  • $money //จำนวนเงิน
  • $sender_phone //เบอร์คนที่โอนมา
$transfer_id	= $values["data"]["section4"]["column2"]["cell1"]["value"];
$money = $values["data"]["section3"]["column1"]["cell1"]["value"];
$sender_phone = $values["data"]["section2"]["column1"]["cell1"]["value"];

Example Cronjob Windows

access_token.php

  • ใส่ข้อมูล $phone
  • ใส่ข้อมูล $password
  • ใส่ข้อมูล $access_token
นำไฟล์อัพลง xampp, apache เเละ เอาลิ้งค์มาใส่ใน Cronjob

Help my Truemoney Wallet Class .-.

  • โครง Class ตัวนี้นำมาจาก likecyber
  • Parameters เเละ URL ตัวนี้นำมาจาก chick4nnn
  • เเนวทางเลี้ยง access_token ตัวนี้นำมาจาก Manatchai Roengtum

class-truewallet-php's People

Contributors

ekkamon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.