Post text in instamojo api

Hi Koders,
I am trying to post text in instamojo api but failed to do then I search community and found many topics but these topics didn’t help me.
So please help me to do this.
url :

Php :

<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, ''); curl_setopt($ch, CURLOPT_HEADER, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); curl_setopt($ch, CURLOPT_HTTPHEADER, array("X-Api-Key:d82016f839e13cd0a79afc0ef5b288b3", "X-Auth-Token:3827881f669c11e8dad8a023fd1108c2")); $payload = Array( 'purpose' => 'FIFA 16', 'amount' => '2500', 'phone' => '9999999999', 'buyer_name' => 'John Doe', 'send_email' => true, 'webhook' => '', 'send_sms' => true, 'email' => '[email protected]', 'allow_repeated_payments' => false ); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload)); $response = curl_exec($ch); curl_close($ch); echo $response; ?>

I have to post api key, token, purpose, amount, buyer_name.

Every data provided in php is only for testing purposes.

Use web component to POST data

I know this but I wants to know how can I post request contain in php.

Create variables that will receive their parameters via post.
$amount = $ _POST [‘amount’];

then use the variable …

In Kodular blocks, send the parameters.

amount= 2500

Like this

1 Like

I use the post + join blocks.

&buyer_name=‘Jonh Doe’
&purpose=‘Fifa 16’

That is also right way​:+1: