Skip to content

Instantly share code, notes, and snippets.

@diogenesjup
Created March 15, 2022 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diogenesjup/931f0aed0ff6a133de8c7c1af1d37e83 to your computer and use it in GitHub Desktop.
Save diogenesjup/931f0aed0ff6a133de8c7c1af1d37e83 to your computer and use it in GitHub Desktop.
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://servidorseguro.cloud/istpay/cobranca/atualizar/2',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'status=PAID&data_transaction=%7Bfield%3Avalue%2Cfield2%3Avalue2%7D',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/x-www-form-urlencoded'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment