【问题标题】:How can i use paypal api for transfer money to bank account in php?我如何使用paypal api将钱转移到php中的银行账户?
【发布时间】:2014-08-22 09:05:00
【问题描述】:

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

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

例如,我的查询给出了一条记录,然后我想向这个银行账户汇款。

我该怎么办???哪个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......//

        }
    }
}

谢谢。

【问题讨论】:

  • 您自己的银行账户?如果没有,你不能这样做。

标签: php paypal


【解决方案1】:

您好,您可以尝试使用 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" />

通知

记得做一个非常强大的验证!!!

【讨论】:

    猜你喜欢
    • 2012-06-04
    • 2020-08-11
    • 2013-10-22
    • 2021-10-09
    • 2020-10-26
    • 2013-04-07
    • 2014-08-27
    • 2018-04-16
    • 2017-03-21
    相关资源
    最近更新 更多