fork download
  1. <?php
  2.  
  3. $curl = curl_init();
  4.  
  5. CURLOPT_URL => 'https://s...content-available-to-author-only...l.com/api/checkout-authorize/addon/viabill',
  6. CURLOPT_RETURNTRANSFER => true,
  7. CURLOPT_ENCODING => '',
  8. CURLOPT_MAXREDIRS => 10,
  9. CURLOPT_TIMEOUT => 0,
  10. CURLOPT_FOLLOWLOCATION => true,
  11. CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  12. CURLOPT_CUSTOMREQUEST => 'POST',
  13. CURLOPT_POSTFIELDS =>'{"protocol":"3.0","transaction":"trans_55287","amount":"264","currency":"DKK","sha256check":"493f93da118884a94d6e9dd257e494e5b83a0100cd6d5628ddb27c307e01b73d","apikey":"eyJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJNRVJDSEFOVCIsIlNZU1RFTSJdLCJ1dWlkIjoiNmM2NmNiNDktMmZkOS0xMWYwLWFiMzItM2JjN2FmNDkxYWVlIiwidHYiOjEsImVudiI6IlBST0RVQ1RJT04iLCJpYXQiOjE3NDcxMjcxMzMsImV4cCI6MjA2MjY1OTkzM30.E0mYXCM8FD3OilawGyC44faKos-KIw5UCbcdfvP0U8Y","order_number":"55287","success_url":"https:\/\/weightworlddk.ccdev.universal-hosting.net\/checkout\/viabill-process-sucess?returnFromViaBill=1&order_id=55287","cancel_url":"https:\/\/weightworlddk.ccdev.universal-hosting.net\/checkout\/viabill-process-cancel?returnFromViaBill=0&order_id=55287","callback_url":"https:\/\/weightworlddk.ccdev.universal-hosting.net\/checkout\/viabill-call-back","customParams":{"firstName":"Test","lastName":"Test","fullName":"Test Test","address":"Dalgas Kiosk","city":"Frederiksberg","postalCode":"2000","country":"Danmark"},"test":true}',
  14. CURLOPT_HTTPHEADER => array(
  15. 'Accept: */*',
  16. 'Content-Type: application/json',
  17. 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36'
  18. ),
  19. ));
  20.  
  21.  
  22. $response = curl_exec($curl);
  23. $server_output = curl_exec($curl);
  24. $httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
  25. $err = curl_error($curl);
  26. curl_close($curl);
  27.  
  28. echo ("cURL Res: " . $response);
  29.  
  30.  
  31. // Check for cURL error
  32. if ($err) {
  33. echo ("cURL Error: " . $err);
  34. }
  35. print_r($httpCode);
  36. ?>
Success #stdin #stdout 0.04s 26076KB
stdin
Standard input is empty
stdout
cURL Res: cURL Error: Could not resolve host: secure.viabill.com0