A
A
Arkady Leontiev2017-03-09 16:47:30
PHP
Arkady Leontiev, 2017-03-09 16:47:30

How to make a check in Nix Money for a payout?

They provide this code.

<?php 

$url = 'https://www.nixmoney.com/send?PASSPHRASE='.urlencode($_POST['PASSPHRASE']).'&PAYER_ACCOUNT='.urlencode($_POST['PAYER_ACCOUNT']).'&PAYEE_ACCOUNT='.urlencode($_POST['PAYEE_ACCOUNT']).'&AMOUNT='.urlencode($_POST['AMOUNT']).'&MEMO='.urlencode($_POST['MEMO']);

[email protected]($url, 'rb');

if($f===false){
   echo 'error openning url';
}
?>

The payout is working. But how to add a check that the payment has passed and the money has been transferred?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arkady Leontiev, 2017-03-09
@arkadiy_90

Already in support in a letter they gave, maybe someone will come in handy

$return = true;
$url = 'https://www.nixmoney.com/send?PASSPHRASE='.urlencode('').'&PAYER_ACCOUNT='.urlencode('').'&PAYEE_ACCOUNT='.urlencode('').'&AMOUNT='.urlencode('0.1').'&MEMO='.urlencode('Агу');

[email protected]($url, 'rb');

if($f===false){
  $return = false;
}

if($return){
      // getting data
      $out=array(); $out="";
      while(!feof($f)) $out.=fgets($f);
      fclose($f);
      
      if($return){
        //search if error isset
        if( count(explode('ERROR', $out))>1)
          $return = false;
      
      }
}

if($return){
   echo "Прошла";
}else{
   echo "Не прошла";
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question