Hi I am integrating Instamojo in one of wordpress theme.I have used Instamojo class and related API functions to create API request, after execution it returns response but with 0 appened at last. I am not getting why that 0 comes. here is my code of instamojo api:
$api = new Instamojo\Instamojo($instamojo_api_key, $instamojo_auth_token);
try {
$response = $api->paymentRequestCreate(array(
'purpose' => 'Test',
'amount' => '20',
'phone' => '8888888888',
'buyer_name' => $username,
'redirect_url' => 'redirect_url',
'send_sms' => false,
"email" => $user_email
));
print($response["longurl"]);///here i am getting long_url but with 0
//// print(rtrim($response["longurl"],0));////tried to remove last 0 not working
}
catch (Exception $e) {
print('Error: ' . $e->getMessage());
}
am I sending wrong data to API call or why does it return 0 as a response?