GithubHelp home page GithubHelp logo

datlechin-momo's Introduction

MoMo API

Cài đặt

Sử dụng Composer để cài đặt:

composer require datlechin/momo

Hoặc bạn cũng có thể tải/copy mã code trong tệp src/Momo.php để sử dụng lại code.

Sử dụng

Nếu bạn cài đặt bằng Composer, bạn cần phải require file vendor/autoload.php để sử dụng thư viện.

require 'vendor/autoload.php';

Sau đó, bạn có thể sử dụng thư viện như sau:

use DatLeChin\Momo\Momo;

// Khởi tạo đối tượng
$momo = new Momo('phone', 'password');

Gửi mã OTP về điện thoại

Để lấy mã OTP, bạn cần gọi phương thức sendOTP(), sau đó Momo sẽ gọi tới số điện thoại của bạn và gửi mã OTP về.

$momo->sendOTP();

Xác nhận mã OTP trên thiết bị mới

Sau khi có mã OTP, bạn cần gọi phương thức regDevice() để xác nhận mã OTP trên thiết bị mới.

$momo->regDevice('mã otp');

Note Bạn có thể mở file index.php để xem code mẫu bên trong.

Đóng góp

Rất vui nếu bạn có thể đóng góp cho dự án này. Bạn có thể tạo một Pull Request hoặc tạo một Issue để báo lỗi.

Donate

Nếu bạn thấy dự án này hữu ích, bạn có thể donate cho tôi qua các ví hoặc ngân hàng sau:

  • Momo: 0372124043 (Ngô Quốc Đạt)
  • Vietcombank: 1017595600 (NGO QUOC DAT)

datlechin-momo's People

Contributors

datlechin 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.