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
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.

Link to comment
Share on other sites

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

Edited by hoangthi
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.