PHP Paypal IPN Integration

0 votes
asked May 25, 2011 by aruna-anandh

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 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 class="payorder_qtydet"> <input type="submit" value="" name="paypal" class="paypalbtn">

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.

1 Answer

0 votes
answered Nov 8 by denis-de-bernardy

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, i.e. "some stuff (100), 1, $10" rather than "some stuff, 100, $10".

Welcome to Q&A, where you can ask questions and receive answers from other members of the community.