### Install Gojek API PHP Native via Composer Source: https://github.com/decoderid/gojek-api-php-native/blob/main/README.md Use this command to install the Gojek API PHP native library using Composer. ```bash $ composer require decoderid/gojek-api ``` -------------------------------- ### Login and OTP Verification Example Source: https://github.com/decoderid/gojek-api-php-native/blob/main/README.md This PHP snippet demonstrates how to log in to the Gojek API, verify OTP, and handle potential MFA challenges. Ensure you have the Composer autoloader included. ```php login($phone, $pin); /** * VERIFY OTP */ $verifyOtp = $gojek->verifyOtp('[OTP]', $login->data->otp_token); if ($verifyOtp->access_token) { print_r($verifyOtp); } if ($verifyOtp->success) { print_r($verifyOtp); } /** * IF PIN AUTHENTICATION AFTER OTP */ if ($verifyOtp->errors[0]->code === 'mfa:customer_send_challenge:challenge_required') { $challengeToken = $verifyOtp->errors[0]->details->challenge_token; $challengeId = $verifyOtp->errors[0]->details->challenges[0]->gopay_challenge_id; $verifyMFA = $gojek->verifyMFA($challengeId, $pin); if ($verifyMFA->success) { $verifyMFAToken = $gojek->verifyMFAToken($challengeToken, $verifyMFA->data->token); print_r($verifyMFAToken); } } ?> ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.