Skip to main content

PayPal Community

  • Dashboard
  • Send and Request
  • Wallet
  • Business
  • Help
Log in

Le Forum de la communauté n’est pas disponible pour les nouveaux messages ou les réponses; les articles précédents restent disponibles pour vérification. Afin de connaître les options d’assistance complètes, rendez-vous sur PayPal.com/HelpCenter

Si vous souhaitez signaler du contenu illégal et contraire au Règlement sur les services numériques de l’Union Européenne (DSA), veuillez cliquer ici.

since ‎Jun-16-2017
SKGupta
SKGupta Contributor
Contributor
1
Post
0
Kudos
0
Solutions
Your 3rd PayPal Anniversary
Your PayPal Anniversary
The Return
Organized
Active
View all
Latest Contributions by SKGupta
  • Topics SKGupta has Participated In
  • Latest Contributions by SKGupta

PayPal payment integration in php codeigniter

by SKGupta Contributor in About Business
‎Jun-16-2017 04:01 AM
‎Jun-16-2017 04:01 AM
Hi guys, I am integrating paypal in my site for first time an I am having difficulty in integration. I am using php codeigniter for development. In my site there is a feature in which seller can add there paypal emailID and buyer have to pay their respective account. For now this is what I have done for the payment: controller index method: class makeOnlinePayment extends CI_Controller { public function __construct() { parent::__construct(); if (!$this->session->userdata('studentLoggedIn')) { redirect('teacher/login'); } $this->load->model('student_paypal_model'); } public function index() { $data['css'] = $this->layout->includeCSSStudent(); $data['js'] = $this->layout->includeJSStudent(array('js/payment')); $data['header'] = $this->load->view(VIEW_FOLDER . '/templates/headerInStudent', $data, TRUE); $data['footer'] = $this->load->view(VIEW_FOLDER . '/templates/footerInStudent', $data, TRUE); $teacherID = $this->session->userdata('studentDetails')->teacher; $studentID = $this->session->userdata('studentDetails')->id; //start paypal data $paypalConfig = $this->student_paypal_model->getPaypalConfig($teacherID)[0]; $data['paypalUrl'] = $paypalConfig->paypalUrl; $data['paypalId'] = $paypalConfig->paypalId; // delete these hardcoded url before make it live $data['paypalCancelUrl'] = base_url() . 'makeOnlinePayment'; $data['paypalSuccessUrl'] = base_url() . 'makeOnlinePayment/success'; $data['paypalCurCode'] = $paypalConfig->paypalCurCode; $this->load->view(VIEW_FOLDER . '/makeOnlinePayment', $data); } public function success() { if($_GET['success']) echo "Successfully paid!";exit(); }else{ die(); } } }     Now View Page: <div class="section-btn-grp hide" id="paymentPaypal"> <form action="<?php echo $paypalUrl; ?>" method="post"> <!-- Identify your business so that you can collect the payments. --> <input type="hidden" name="business" value="<?php echo $paypalId; ?>"> <!-- Specify a Buy Now button. --> <input type="hidden" name="cmd" value="_xclick"> <!-- Specify details about the item that buyers will purchase. --> <input type="hidden" name="item_name" value="<?php echo 'Fee: ' . $amountPayable >= 0 ? number_format($amountPayable, 0) : 0; ?>"> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label>Amount <span class="mandatory">$*</span> : <span class="error" id="useraddress_error"> &nbsp; </span></label> <input type="number" name="amount" value="<?php echo $amountPayable >= 0 ? number_format($amountPayable, 0) : 0; ?>"> </div> </div> </div> <input type="hidden" name="currency_code" value="<?php echo $paypalCurCode; ?>"> <!-- Specify URLs --> <input type='hidden' name='cancel_return' value='<?php echo $paypalCancelUrl; ?>'> <input type='hidden' name='return' value='<?php echo $paypalSuccessUrl; ?>'> <!-- Display the payment button. --> <input class="btn btn-primary" type="submit" name="submit" value="Pay"> </form>   </div>   Now I am wondering how I should give seller and buyer information and also why I am not able to make payment. Every time I login to paypal account it's saying "Return to Sonu Sonu's Test Store At this time, we are unable to process your request. Please return to Sonu Sonu's Test Store and try another option." can any one help me out? Thanks ... View more
Paypal Logo
  • Help
  • Contact Us
  • Security
  • Fees
  • © 1999-2025 PayPal, Inc. All rights reserved.
  • Privacy
  • Legal
  • Cookies
  • Policy Updates

The money in your balance is eligible for pass-through FDIC insurance.

The PayPal Cash Mastercard is issued by The Bancorp Bank pursuant to a license by Mastercard International Incorporated. The Bancorp Bank; Member FDIC.

Powered by Khoros