Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/235.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在php中使用paypal api将资金转账到银行帐户?_Php_Paypal - Fatal编程技术网

如何在php中使用paypal api将资金转账到银行帐户?

如何在php中使用paypal api将资金转账到银行帐户?,php,paypal,Php,Paypal,我对此一无所知。我搜索了我的网站,但找不到解决方案 我的要求是,我的查询从数据库中获取银行账号 例如,我的查询给出了一条记录,然后我想把钱汇到这个银行帐户 我该怎么办???我使用哪种api 我的代码如下: $queryOperator = "SELECT * FROM operatortransaction AS ot LEFT JOIN paymenttransaction AS pt ON ot.OperatorID != pt.OperatorID

我对此一无所知。我搜索了我的网站,但找不到解决方案

我的要求是,我的查询从数据库中获取银行账号

例如,我的查询给出了一条记录,然后我想把钱汇到这个银行帐户

我该怎么办???我使用哪种api

我的代码如下:

$queryOperator = "SELECT * FROM operatortransaction AS ot LEFT JOIN paymenttransaction AS pt ON
                    ot.OperatorID != pt.OperatorID WHERE ot.IsPaymentRequest = 1 AND ot.Amount != pt.Amount ";

$arrOperator = $obj->select($queryOperator);

$count = 0;

if(!empty($dataOperator))
{
    foreach($arrOperator as $operator)
    {
        if($arrOperator[$count]['Amount'] >= $arrOperator[$count]['RequestAmount'])
        {
            $queryDetail = "SELECT * FROM operatorprofile WHERE UserID = '$arrOperator[$count]['OperatorID']' ";
            $Data = $obj->select($queryDetail);


            // i want to put api code here......//

        }
    }
}

谢谢。

您好,您可以尝试使用PayPal Xclick

<form action="https://secure.paypal.com/uk/cgi-bin/webscr" method="post" name="paypal" id="paypal">
<!-- Pre Populate the Paypal Checkout Page With Customer Details, -->
<input type="hidden" name="first_name" value="<?php echo Firstname?>">
<input type="hidden" name="last_name" value="<?php echo Lastname?>">
<input type="hidden" name="email" value="<?php echo Email?>">
<input type="hidden" name="address1" value="<?php echo Address?>">
<input type="hidden" name="address2" value="<?php echo Address2?>">
<input type="hidden" name="city" value="<?php echo City?>">
<input type="hidden" name="zip" value="<?php echo Postcode?>">
<input type="hidden" name="day_phone_a" value="">
<input type="hidden" name="day_phone_b" value="<?php echo Mobile?>">

<!-- We dont need to use _ext-enter anymore to prepopulate pages -->
<!-- cmd = _xclick will automatically pre populate pages -->                                                  
<!-- More Info: https://www.x.com/docs/DOC-1332 -->
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="paypal@email.com" />
<input type="hidden" name="cbt" value="Return to Your Business Name" />
<input type="hidden" name="currency_code" value="GBP" />

<!-- Allow customer to enter desired quantity -->
<input type="hidden" name="quantity" value="1" />
<input type="hidden" name="item_name" value="Name of Item" />

<!-- Custom Value You want to send and process back in the IPN -->
<input type="hidden" name="custom" value="<?php echo session_id().?>" /> 

<input type="hidden" name="shipping" value="<?php echo $shipping_price; ?>" />
<input type="hidden" name="invoice" value="<?php echo $invoice_id ?>" />
<input type="hidden" name="amount" value="<?php echo $total_order_price; ?>" />
<input type="hidden" name="return" value="http://<?php echo $_SERVER['SERVER_NAME']?>/shop/paypal/thankyou"/>
<input type="hidden" name="cancel_return" value="http://<?php echo $_SERVER['SERVER_NAME']?>/shop/paypal/cancelled" />

<!-- Where to send the paypal IPN to. -->
<input type="hidden" name="notify_url" value="http://<?php echo $_SERVER['SERVER_NAME']?>/shop/paypal/process" />
通知


一定要记得做一个非常有力的验证

你自己的银行账户?如果没有,你就不能那样做。