Jump to content

About Tranfering (Perfect Money System)


hoangthi

Recommended Posts

This is their (Perfect Money) example: https://perfectmoney.com/acct/samples/parse_spend.txt

This my function: 

Unfortunately, It doesn't work, I need your help.

Thanks so much.

<?php

$_acct = "U9876543"; // My account
$PerfectMoney = "U1234567"; // Receiver account

$payout = "0.03"; //Amount
$_paymemo = "Something"; //Memo
_MakeSpend($_acct,$_acct_pass,$PerfectMoney,$payout,$_paymemo);

//new version - RETURN BATCH NUMBER!!!
	function _MakeSpend($from, $to, $amount, $memo) {
	
	
$f=fopen('https://perfectmoney.is/acct/confirm.asp?AccountID=1234567&PassPhrase=abcxyz&Payer_Account=$from&Payee_Account=$to&Amount=$amount&PAY_IN=1&Memo=$memo&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];
}


return $ar;


}

?>

PS: I am Php newbie, If you can. Please help me to write new function name: _MakeSpend

Once Again, Thanks

Link to comment
https://forums.phpfreaks.com/topic/278923-about-tranfering-perfect-money-system/
Share on other sites

It doesn't work

 

 

since you forgot to tell anyone what "it doesn't work" means, we cannot help you.

 

we don't have an account to try ourself and it would be unwise for you to give anyone here access to your actual account, so you are the only person here who can run your code and observe what result it produces. but if you don't communicate what result your code produced, you are on your own with this problem.

actually, I just want to make a function which is based on this code :

https://perfectmoney.com/acct/samples/parse_spend.txt

but not successful....

 

 $f=fopen('[url="https://perfectmoney.is/acct/confirm.asp?AccountID=myaccount&PassPhrase=mypassword&Payer_Account=U987654&Payee_Account=U1234567&Amount=1&PAY_IN=1&PAYMENT_ID=1223"]https://perfectmoney.is/acct/confirm.asp?AccountID=myaccount&PassPhrase=mypassword&Payer_Account=U987654&Payee_Account=U1234567&Amount=1&PAY_IN=1&PAYMENT_ID=1223[/url]'

 

I have variables: myaccount, mypassword, payer account.... and I want to make a function to fill in the link

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.