Answer the question
In order to leave comments, you need to log in
How to make money transfers from your site to the user's account using Perfect money?
How to make a money transfer from your site to a user's account using Perfect Money?
There is a site, and each registered user has his own so-called "wallet", after watching a certain video, a certain amount is added to his account, after this number i.e. "amount" must be transferred to the user's Perfect money account. as? and how to do it?
Answer the question
In order to leave comments, you need to log in
I'm sorry, but can you please help me to chew this code?
<?php
/*
This script demonstrates transfer proccess between two
PerfectMoney accounts using PerfectMoney API interface.
*/
// trying to open URL to process PerfectMoney Spend request
$f=fopen('https://perfectmoney.is/acct/confirm.asp?AccountID=myaccount&PassPhrase=mypassword&Payer_Account=U987654&Payee_Account=U1234567&Amount=1&PAY_IN=1&PAYMENT_ID=1223', 'rb');
if($f===false){
echo 'error openning url';
}
// getting data
$out=array(); $out="";
while(!feof($f)) $out.=fgets($f);
fclose($f);
// searching for hidden fields
if(!preg_match_all('/<input name='(.*)' type='hidden' value='(.*)'>/', $out, $result, PREG_SET_ORDER)){
echo 'Ivalid output';
exit;
}
$ar="";
foreach($result as $item){
$key=$item[1];
$ar[$key]=$item[2];
}
echo '<pre>';
print_r($ar);
echo '</pre>';
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question