简体   繁体   中英

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.

<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. So in the paypal its shows EX: itemprice:$10 and quantity=100 in the total amount column it shows $1,000. But in my application, i need the total to be same as the original price ie.$10 only. 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. 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".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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