Search code examples
codeigniterpaypalsandbox

Do Paypal Transaction in Codeigniter using Sandbox


I am new in codeigniter. I want to implement PayPal transaction in my examination system. User first Pay fees of exam after they allow to solve exam. How to implement it. And which HTML variable used for that. I was use _xclick but it is not proper to pay exam fees. I use Sandbox A/c

echo '<input type="hidden" name="cmd" value="_xclick">';
echo "<input type='hidden' name='upload' value='1'>";
echo "<input type='hidden' name='return' value=' ".$this->config->item('returnurl')." '>";
echo "<input type='hidden' name='business' value=' ".$this->config->item('business')." ' >";
echo "<input type='hidden' name='item_name' value=' ".$value->exam_name." '>";
echo "<input type='hidden' name='item_number' value=' ".$value->exam_id." '>";
echo "<input type='hidden' name='amount' value=' ".$value->fees." '>";
echo "</form>";

Solution

  • Below are the options suggesting when can you use dufferent CMD types:

    1. Buy Now buttons — <INPUT TYPE="hidden" name="cmd" value="_xclick">
    2. Shopping cart buttons — <INPUT TYPE="hidden" name="cmd" value="_cart">
    3. Buy Gift Certificate buttons — <INPUT TYPE="hidden" name="cmd" value="_oe-gift-certificate">
    4. Subscribe buttons — <INPUT TYPE="hidden" name="cmd" value="_xclick-subscriptions">
    5. Automatic Billing buttons — <INPUT TYPE="hidden" name="cmd" value="_xclick-auto-billing">
    6. Installment Plan buttons — <INPUT TYPE="hidden" name="cmd" value="_xclick-payment-plan">
    7. Donate buttons — <INPUT TYPE="hidden" name="cmd" value="_donations">

    And here is a helpful link: paypal