I
I
Ismar2015-10-31 07:42:41
Programming
Ismar, 2015-10-31 07:42:41

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

2 answer(s)
I
Ismar, 2015-10-31
@Ismar

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>';
?>

E
Eugene, 2016-04-30
@beatleboy

Here is a package that can help you:
GitHub
It is tailored for Laravel 5, contains migrations, and is tailored for quick deployment, no one bothers to remake it for your script.
The script can:

  • Send transfers
  • Receive wallets and their balances

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question