Link to home
Start Free TrialLog in
Avatar of nasirbest
nasirbestFlag for Pakistan

asked on

Moneybookers auto topup issue

scenario: user has successfully sing up at moneybookers with pay-ondemand feature. and moneybookers has submited following parameters at our status monitoring script.

note= moneybookers has enabled reoccurring payments and pay-ondemand feature for this account
       = client has sufficient balance in his account

    [status] => 2
    [md5sig] => 12345678901234567890123456789012
    [pay_to_email] => merchant_account@host.com
    [topup_amount] => 10.00
    [mb_transaction_id] => 111111111
    [currency] => EUR
    [customer_id] => 22222222
    [payment_type] => WLT
    [mb_currency] => USD
    [plan] => myPackage 30
    [rec_payment_type] => recurring
    [merchant_id] => 33333333
    [rec_payment_id] => 555555555
    [mb_amount] => 41.28
    [amount] => 30.00
    [transaction_id] => 66666666
    [pay_from_email] => client_account@host.com


according to above info I have submitted following request to moneybookers but received PAYMEND DENIED error


https://www.moneybookers.com/app/ondemand_request.pl?action=prepare&email=merchand_account%40host.com&password=12345678901234567890123456789012&amount=10.00¤cy=EUR&rec_payment_id=555555555

any help

<?php

$mb_payment = array();

$mb_payment['email']          = 'merchant_account@host.com'; 
$mb_payment['password']       = MD5('mypass'); 

$mb_payment['amount']         = '10.00';
$mb_payment['currency']       = 'EUR';
$mb_payment['rec_payment_id'] = '555555555';
//$mb_payment['frn_trn_id']     = '66666666';  // I also have tried it


$url = 'https://www.moneybookers.com/app/ondemand_request.pl?action=prepare';
foreach ($mb_payment as $key => $value) {
    if ($value != '') {
        $url .= '&'.$key.'='.urlencode($value);
    }
}

$oCURL = curl_init($url);
curl_setopt($oCURL, CURLOPT_HEADER, 0);
curl_setopt($oCURL, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($oCURL, CURLOPT_COOKIEFILE, "/tmp/cookiefile");
curl_setopt($oCURL, CURLOPT_COOKIEJAR, "/tmp/cookiefile"); 
curl_setopt($oCURL, CURLOPT_HTTPGET, true);

$strResponse = curl_exec($oCURL); 
curl_close($oCURL);

print_r($strResponse);
echo "<br />\n";
?>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of nasirbest
nasirbest
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial