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>";
Below are the options suggesting when can you use dufferent CMD types:
Buy Now buttons — <INPUT TYPE="hidden" name="cmd" value="_xclick">
Shopping cart buttons — <INPUT TYPE="hidden" name="cmd"
value="_cart">
Buy Gift Certificate buttons — <INPUT TYPE="hidden" name="cmd"
value="_oe-gift-certificate">
Subscribe buttons — <INPUT TYPE="hidden" name="cmd"
value="_xclick-subscriptions">
Automatic Billing buttons — <INPUT TYPE="hidden" name="cmd"
value="_xclick-auto-billing">
Installment Plan buttons — <INPUT TYPE="hidden" name="cmd"
value="_xclick-payment-plan">
Donate buttons — <INPUT TYPE="hidden" name="cmd"
value="_donations">
And here is a helpful link: paypal
Related
I want to take 3 different form information from a single page for the order and I want to print these 3 different incoming data to different SQL tables.
Order, shipping information and invoice information in three different forms.
<form route="{{route('order')}}" methot="POST" id="order">
{{ csrf_field() }}
<input type='hidden' name='user_id' value='11'>
<input type='text' name='book_name' value='example book'>
<input type='text' name='book_price' value='example book price'>
</form>
<form route="{{route('shipping')}}" methot="POST">
{{ csrf_field() }}
<input type='hidden' name='user_id' value='11'>
<input type='text' name='shipping_country' value='example shipping_country'>
<input type='text' name='shipping_address' value='example shipping_address'>
<input type='hidden' name='order_id' value='How Can take this order value?'>
</form>
<form route="{{route('invoice')}}" methot="POST">
{{ csrf_field() }}
<input type='hidden' name='user_id' value='11'>
<input type='text' name='invoice_identity' value='example identity number'>
<input type='text' name='company_name' value='example company name'>
<input type='hidden' name='order_id' value='How Can take this order value?'>
</form>
What could be a practical method? Another question is how can order_id of the first form on the same page be added to the hidden form in others?
you cant make 3 different from submitting at the same time, you can put all the info in one form, then in the controller, you can save it in 3 different tables,
you should be doing it at the backend in your controller, not in the front end to submit your 3 requests, this is not the right way to do it.
Hii I am using paypal recurring payment in codeigniter. But i want to use IPN inside this. Here is my form in a view file.
$paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
$merchant_email = 'futureloop#merchent.com';
<form name="_xclick" action="<?php echo $paypal_url;?>" method="post">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="<?php echo $merchant_email; ?>">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="no_shipping" value="1">
<input type="image" src="http://www.paypal.com/en_GB/i/btn/x-click-but20.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="a3" value="54.00">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="D">
<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
</form>
How can i use IPN inside this in codeigniter?
Please help me.
checkout below documentation link where you can setup for IPN and also you will get same code for PHP regarding how to listen IPN data and how process it.
https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNIntro/
For listening paypal IPN
https://github.com/paypal/ipn-code-samples/blob/master/paypal_ipn.php
I have been using PayPal Payments Standard. Everything has been working great. Now I want to add support for coupon discounts.
According to the documentation, the discount_amount_cart variable appears to be what I want:
Single discount amount charged cart-wide.
It must be less than the selling price of all items combined in the cart. This variable overrides any individual item discount_amount_x values, if present.
Applies only to the Cart Upload command.
So, I add the variable to my form:
<form id="Paypal" name="Paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input id="cmd" name="cmd" type="hidden" value="_cart">
<input id="upload" name="upload" type="hidden" value="1">
<input id="business" name="business" type="hidden" value="kelly#hopskipdesign.com">
<input id="custom" name="custom" type="hidden" value="Client">
<input id="discount_amount_cart" name="discount_amount_cart"
type="hidden" value="$4.00">
<input id="tax_cart" name="tax_cart" type="hidden" value="$1.65">
<input id="currency_code" name="currency_code" type="hidden" value="USD">
<input id="return" name="return" type="hidden" value="http://www.hopskipphotography.com/Order/Confirm/Client">
<input id="cancel_return" name="cancel_return" type="hidden" value="http://www.hopskipphotography.com/Order/Cart/Client">
<input id="cbt" name="cbt" type="hidden" value="Place Order">
<input id="item_name_1" name="item_name_1" type="hidden" value="Photo #6">
<input id="amount_1" name="amount_1" type="hidden" value="$20.00">
<input id="item_number_1" name="item_number_1" type="hidden" value="B49A8382">
<input id="quantity_1" name="quantity_1" type="hidden" value="1">
<input id="item_name_2" name="item_name_2" type="hidden" value="Photo #10">
<input id="amount_2" name="amount_2" type="hidden" value="$20.00">
<input id="item_number_2" name="item_number_2" type="hidden" value="B49A8428">
<input id="quantity_2" name="quantity_2" type="hidden" value="1">
<div class="checkout-button">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" alt="Check out with PayPal">
</div>
</form>
But when I click the button, everything appears except the discount:
I found a similar question where the answer was to use the tax_cart variable instead of tax_x. But I was already using tax_cart.
Any other ideas as to why discount_amount_cart is not working?
Unlike other amount variables, discount_amount_cart does not like dollar signs.
When I changed the field to:
<input id="discount_amount_cart" name="discount_amount_cart"
type="hidden" value="4.00">
PayPal displayed the discount:
I have an order form with data. on submit the controller function new_blank_order_summary is called.
the syntax for this is:
function new_blank_order_summary()
{
echo "orderlines: ".$this->input->post(orderlines);
echo "customer: ".$this->input->post('customer');
echo "period: ".$this->input->post('period');
echo "creditlimit: ".$this->input->post('creditlimit');
$this->load->view('sales/new_blank_order_summary');
}
I cannot get the post information to display or echo? my input Name and ID is orderlines but this is not being posted or received properly.
Apologies for the 'stupid' question.
any advice welcome.
HTML
<form id="sales_blank_order_details" action="/sales/new_blank_order_summary" method="post">
<table >
<tr><td>Customer</td><td>Period</td><td>UoM</td><td>Credit Limit</td><td>Balance</td><td>New Balance</td><td>Order Lines</td><td>Round to Bundle</td></tr>
<tr><td>
<input type="text" name="customer" id="customer" value="<?php echo $customer; ?>" disabled>
</td><td>
<input type="text" name="period" id="period" value="<?php echo $period." to ".$newperiod; ?>" disabled>
</td><td>
<input type="text" name="buom" id="buom" value="<?php echo $buom; ?>" disabled>
</td><td>
<input type="text" name="creditlimit" id="creditlimit" value="<?php echo $creditlimit['creditlimit']; ?>" disabled>
</td><td>
<input type="text" name="currentbalance" id="currentbalance" value="<?php echo $creditlimit['currentbalance']; ?>" disabled>
</td>
<td>
<input type="text" name="newbalance" id="newbalance" value="<?php echo $creditlimit['currentbalance']; ?>" disabled>
</td><td>
<input type="text" name="orderlines" id="orderlines" value="1" disabled>
</td><td>
<input type="checkbox" name="rounduptobundle" id="rounduptobundle" checked>
</td></tr></table>
<input type="submit" name="blank_order_lines" id="blank_order_lines" value="Save Order and Proceed">
</form>
None of these posts are outputted by controller.
You've disabled the orderlines text input field so that's why it will not get posted. Remove disabledand it will show up in $this->input->post().
what is the name and value of your submit button. Usually the name of my submit button is name="submit" and the value is value="submit". So then I try $this->input->post('submit')=='submit'. try this in your if condition. I hope it will work. best of luck.
function new_blank_order_summary()
{
echo "orlderlines: ".$this->input->post('orderlines');
echo "customer: ".$this->input->post('customer');
echo "period: ".$this->input->post('period');
echo "creditlimit: ".$this->input->post('creditlimit');
$this->load->view('sales/new_blank_order_summary');
}
Please try this code. I didn't change a single line in it. Only I put the single quotes in the 3rd line. And, changed it's variable name is wrong so I changed it
On clicking "place order" in Magento, I want to capture some of its values and feed them to the following form:
<form method="post" action="https://www.jambopay.com/JPExpress.aspx" target="_blank">
<input type="hidden" name="jp_item_type" value="cart"/>
<input type="hidden" name="jp_item_name" value="test shop"/>
<input type="hidden" name="order_id" value="455879"/>
<input type="hidden" name="jp_business" value="business#yourdomain.com"/>
<input type="hidden" name="jp_amount_1" value="51"/>
<input type="hidden" name="jp_amount_2" value="0"/>
<input type="hidden" name="jp_amount_5" value="0"/>
<input type="hidden" name="jp_payee" value="email#yourcustomer.com"/>
<input type="hidden" name="jp_shipping" value="company name"/>
<input type="hidden" name="jp_rurl" value="http://www.yourwebsite.com/testpost/Result.aspx?ii=0"/>
<input type="hidden" name="jp_furl" value="http://www.yourwebsite.com/testpost/Result.aspx?ii=1"/>
<input type="hidden" name="jp_curl" value="http://www.yourwebsite.com/testpost/Result.aspx?ii=2"/>
<input type="image" src="https://www.jambopay.com/jambohelp/jambo/rsc/paymentsbyJamboPay.jpg"/>
</form>
The values include:
Order Number,
Total Amount,
Customers Email Address,
How do i do this?
You can get value of order after save order is called you can get last order id from this methods
$orderId = Mage::getSingleton('checkout/session')->getLastOrderId();
once you have order id then load order like this
$order = Mage::getModel('sales/order')->load($orderId);
and you can get all details of order