How to implement paypal in Codeigniter - codeigniter

I have developed an site using Codeigniter and I want to put paypal for one of my application.For that I have followed many forms like THIS but while I followed all the steps,it giving me blank screens...Can anyone tell me or even suggest me for the better tutorial for Paypal..Thanks in advance..

use following paypal form pattern for paypal payment
//$urlpaypal = "https://www.paypal.com/cgi-bin/webscr";
//$urlpaypal = "https://www.sandbox.paypal.com/cgi-bin/webscr";//sandbox
<form method="post" name="frmPayPal" id="frmPayPal" action="<?=$urlpaypal ?>">
<input type="hidden" name="item_number" value="<?=$id?>">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="business" value="<?=$businessId?>">
<input type="hidden" name="redirect_cmd" value="_cart">
<input type="hidden" name="handling_cart" value="<?=$shipprice?>">
<input type="hidden" name="cmd" value="_ext-enter" />
<input type='hidden' name='upload' value='1'>
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="lc" value="<?php echo $lccode;?>">
<input type="hidden" name="bn" value="PP-SubscriptionsBF">
<input type="hidden" name="image_url" value="<?=base_url()?>img/logo.jpg">
<input type="hidden" name="return" value="<?=base_url()?>index.php/payment/receipt/<?php echo $id;?>">
<input type="hidden" name="notify_url" value="<?=base_url()?>index.php/payment/notify">
<input type="hidden" name="cancel_return" value="<?=base_url()?>index.php/payment/cancle">
<input type="hidden" name="invoice" value="<?=base64_encode($invoiceId)?>">
<input type="hidden" name="currency_code" value="<?php echo $currencycode;?>">
<input type="hidden" name="src" value="1" />
<input type="hidden" name="sra" value="1" />
<input type="hidden" name="cs" value="0" />
<input type="hidden" name="custom" value="<?=$customFieldValue?>">
<input type="hidden" name="discount_amount_cart" value="<?=$discount_amount?>">
<input type="hidden" name="cc_number" value="123">
<input type="hidden" name="cpp_ headerback_ color" value="78f3f5">
<input type="hidden" name="cpp_ headerborder_color" value="78f3f5">
<input type="hidden" name="cpp_payflow_ color" value="78f3f5">
</form>
and js code for auto form submission in one second
<script type="text/javascript" language="javascript">
setTimeout("document.forms['frmPayPal'].submit()", 1000);
</script>

Related

In my Laravel 8 Multi step form not submitting

Form not submit, eventually, it does not show any error, When I click on submit button nothing happens.
Blade file
<form id="msform" method="post" enctype="multipart/form-data" action="{{ route('agent.emp.data.add') }}">
#csrf
<fieldset>
<input type="text" name="empName" placeholder="Enter Your Name" />
<input type="text" placeholder="Date Of Birth" name="empDob" onfocus="(this.type='date')"
onblur="(this.type='text')" id="date" />
<input type="email" name="empEmail" placeholder="Enter Your Email Id" />
<input type="tel" name="empPhone" placeholder="Enter Your Phone Number" />
<input type="button" name="next" value="Next" />
</fieldset>
<fieldset>
<input type="file" name="empPhoto" accept="image/*" onchange="empphoto(this);">
<input type="button" name="previous" value="Previous" />
<input type="submit" name="submit" value="Submit" />
</fieldset>
</form>
Web Route
Route::post('empdataform', [AgentController::class, 'AgentEmpDataAdd'])->middleware('guest')->name('agent.emp.data.add');
Note: I add the AgentController In Route Top
Agent Controller
class AgentController extends Controller
{
public function AgentEmpDataAdd(Request $request){
return $request->all();
}
}
Please Help me in this mater.

How to make Code Igniter Controller for multiple input form with type="file"

i want to ask, how to make the controller function in CodeIgniter for this view ?
<form action="<?=base_url()?>posts/new_post" method="post" enctype="multipart/form-data"><br>
<input type="file" name="before" id="before" ><br>
<input type="file" name="after" id="after" ><br>
<input type="text" class="form-control" id="title" name="title" placeholder="Enter name"><br>
<textarea class="form-control" id="description" name="description" placeholder="Enter name"></textarea><br>
<input type="submit" value="Submit Profile Picture" name="submit" class="btn btn-primary ">
</form>
Thank You

use the hidden form value in virtuemart joomla

i want to use the hidden form value "virtuemart_product_price" a administrator\components\com_virtuemart\helpers\calculationh.php
this form is added in components\com_virtuemart\views\cart\tmpl\default.php ..
<form method="post" class="product js-recalculate" action="/ecomm/index.php/component/virtuemart/">
<div class="addtocart-bar">
<!-- <label for="quantity229" class="quantity_box">Quantity: </label> -->
<span class="quantity-box">
<input type="hidden" class="quantity-input js-recalculate" name="quantity[]" value="1"/>
</span>
<span class="addtocart-button">
<input type="submit" name="addtocart" class="addtocart-button" value="Pick free" title="Pick free" /> </span>
<div class="clear"></div>
</div>
<input type="hidden" name="virtuemart_product_price" value="5" />
<input type="hidden" class="pname" value="Custom Item"/>
<input type="hidden" name="option" value="com_virtuemart"/>
<input type="hidden" name="view" value="cart"/>
<noscript><input type="hidden" name="task" value="add"/></noscript>
<input type="hidden" name="virtuemart_product_id[]" value="<?php echo virtuemart_product_id;?>"/>
</form>
i tried to get but i can't find a solution.

How can I fix character encoding MVC3?

Hello everyone I have added a search engine on my project but when I click the search button some characters are going crazy like ş seems ÅŸ. After that I have added the code as you can see below at Shared cshtml ;
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
Finally I have added this to webconfig file
<system.web>
<globalization culture="tr-TR" uiCulture="tr-TR" fileEncoding="utf-8"
responseEncoding="utf-8" requestEncoding="utf-8" />
But nothing was changed. Could you help me please ?
Here is my search code
<form method="get" action="http://www.google.com.tr/custom" target="google_window">
<input type="hidden" name="domains" value="www.maltepe.bel.tr"></input>
<label for="sbi" style="display: none"></label>
<input type="text" name="q" style="height:14px;width:167px" value="" id="sbi"></input>
<button type="submit" name="sa" value="Arama" id="sbb"></button>
<input type="hidden" name="sitesearch" value="www.maltepe.bel.tr" id="ss1"></input>
<input type="hidden" name="client" value="pub-2231511596197409"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="channel" value="1809328852"></input>
<input type="hidden" name="ie" value="ISO-8859-9"></input>
<input type="hidden" name="oe" value="ISO-8859-9"></input>
<input type="hidden" name="cof" value="GALT:#E9382F;GL:1;DIV:#CCCCCC;VLC:7E3939;AH:center;BGC:FFFFFF;LBGC:FF3333;ALC:E9382F;LC:E9382F;T:000000;GFNT:7E3939;GIMP:7E3939;FORID:1"></input>
<input type="hidden" name="hl" value="tr"></input>
</form>
Try to change ie and oe value to "UTF-8" see if it is ok.

Programmatically pass a url to an anonymous proxy like http://www.trycatchme.com

I'm using .net httpwebrequest &/or webclient class
How can i Progamatically pass a url to an anonymous proxy like http://www.trycatchme.com and get back a result
<form method="post" action="/index.php">
<input id="address_bar" type="text" name="q" value="http://www." onfocus="this.select()" />
<input id="surf_button" type="image" value="Surf Now" src="images/surfnowbtn.gif" />
<input type="hidden" name="hl[include_form]" value="1" />
<input type="hidden" name="hl[remove_scripts]" value="1" />
<input type="hidden" name="hl[accept_cookies]" value="1" />
<input type="hidden" name="hl[show_images]" value="1" />
<input type="hidden" name="hl[show_referer]" value="1" />
<input type="hidden" name="hl[base64_encode]" value="1" />
<input type="hidden" name="hl[strip_meta]" value="1" />
<input type="hidden" name="hl[session_cookies]" value="1" />
</form>
The HttpWebRequest.Proxy Property might be what you want.

Resources