PHP code example of maulana20 / gojekid
1. Go to this page and download the library: Download maulana20/gojekid library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
maulana20 / gojekid example snippets
composer
use Maulana20\GojekID;
$gojek = new GojekID();
$loginToken = $gojek->loginPhone('<mobilePhone>')->getLoginToken();
$loginToken = $gojek->loginEmail('<Email>')->getLoginToken();
$authToken = $gojek->loginAuth('<loginToken>', '<OTP>')->getAuthToken();
$gojek->setAuthToken('<authToken>');
$result = $gojek->getCustomer()->getResult();
$gojek->setAuthToken('<authToken>');
$result = $gojek->editAccount('<mobilePhone>', '<email>', '<name>')->getResult();
$gojek->setAuthToken('<authToken>');
$balance = $gojek->checkBalance()->getBalance();
$gojek->setAuthToken('<authToken>');
$gojek->logout();
$gojek->setAuthToken('<authToken>');
$result = $gojek->gopayDetail()->getResult();
$gojek->setAuthToken('<authToken>');
$result = $gojek->gopayHistory('<page>', '<limit>')->getResult();
$gojek->setAuthToken('<authToken>');
$QrId = $gojek->checkWalletCode('<mobilePhoneTo>')->getQrId();
$gojek->setAuthToken('<authToken>');
$ref = $gojek->gopayTransfer('<QrId>', '<PIN>', '<amount>', '<description>')->getRef();
$gojek->setAuthToken('<authToken>');
$result = $gojek->bookingHistory('<userId>')->getResult();
$gojek->setAuthToken('<authToken>');
$result = $gojek->bookingActive()->getResult();
$gojek->setAuthToken('<authToken>');
$result = $gojek->bookingByOrder('<orderNo>')->getResult();
$gojek->setAuthToken('<authToken>');
$result = $gojek->calculate()->getResult();
$gojek->setAuthToken('<authToken>');
$result = $gojek->gofoodHome('<latLong>')->getResult();
$gojek->setAuthToken('<authToken>');
$result = $gojek->gofoodNearby('<latLong>', '<page>', '<limit>')->getResult();
$gojek->setAuthToken('<authToken>');
$result = $gojek->gofoodRestaurantById('<restaurantId>')->getResult();
$gojek->setAuthToken('<authToken>');
$result = $gojek->gofoodRestaurantByCategory('<category>', '<page>', '<limit>')->getResult();
$gojek->setAuthToken('<authToken>');
$result = $gojek->gopointBalance()->getResult();
$gojek->setAuthToken('<authToken>');
$result = $gojek->gopointNext()->getResult();
$gojek->setAuthToken('<authToken>');
$result = $gojek->gopointReedem('<goPointsToken>')->getResult();
$gojek->setAuthToken('<authToken>');
$result = $gojek->areaLocation('<latLong>')->getResult();
$gojek->setAuthToken('<authToken>');
$result = $gojek->gorideNearby('<latLong>')->getResult();
$gojek->setAuthToken('<authToken>');
$result = $gojek->gocarNearby('<latLong>')->getResult();
$gojek->setAuthToken('<authToken>');
$result = $gojek->gosendNearby('<latLong>')->getResult();
$gojek->setAuthToken('<authToken>');
$result = $gojek->gomartNearby('<latLong>')->getResult();