简体   繁体   English

PHP Paypal IPN集成

[英]PHP Paypal IPN Integration

I have been using the paypal ipn for the buyout option in my site.The ipn process requires various hidden fields to pass through the payment gateway.Some of the hidden fields such amount,price,billing_email.我一直在使用 paypal ipn 作为我网站中的买断选项。ipn 过程需要各种隐藏字段才能通过支付网关。一些隐藏字段,例如金额、价格、billing_email。

<div class="payorder_det">      
<div class="payorder_qtydet">
    <div class="payorder_qtyno">
        <label>Please choose your Card Quantity:</label>
    </div>
<div class="payorder_qtyinfo">
<input type="radio" name="quantity" value="100" onclick="changeamount(this)" checked>100 
<input type="radio" name="quantity" value="250" onclick="changeamount(this)"> 250 
<input type="radio" name="quantity" value="1000" onclick="changeamount(this)">1000 
</div> 
<div class="payorder_qtyinfo">
    <label><b>Price:</b> &nbsp;</label>
    $<input id="amount" name="amount" value="20" 
    style="width:50px;border:none" readonly="true"></input>
</div>
</div>
<div class="payorder_qtydet">
    <input type="submit" value="" name="paypal" class="paypalbtn">
</div> 
</div> 

The current proces works correctly by calculating the Total=Quantity*Price.当前过程通过计算 Total=Quantity*Price 正常工作。 So in the paypal its shows EX: itemprice:$10 and quantity=100 in the total amount column it shows $1,000.因此,在 paypal 中,它显示 EX: itemprice:$10 和 quantity=100 在总金额列中显示 $1,000。 But in my application, i need the total to be same as the original price ie.$10 only.但在我的应用程序中,我需要与原价相同,即仅 10 美元。 Please suggest any ideas to get this field value as per the requirement.请根据要求提出任何想法以获取此字段值。

Please suggest any ideas to get this field value as per the requirement.请根据要求提出任何想法以获取此字段值。

Pass it differently to paypal.以不同方式将其传递给 paypal。 In the PP cart details, append the number of items in parenthesis and set the quantity to 1, ie "some stuff (100), 1, $10" rather than "some stuff, 100, $10".在 PP 购物车详情中,append 括号中的商品数量并将数量设置为 1,即“some stuff (100), 1, $10”而不是“some stuff, 100, $10”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM