Guidance related to Paypal Integration Using Codeigniter - codeigniter

I need some guidance related to PayPal Integration. It's not similar to a regular cart.
After checkout, the site offers a form for payment option. Either it's PayPal, or some other payment process. The form directs to controller after the user submits. An array exists, which contains all item values.
From here on how can I proceed to the Paypal site?

Just to let you know that we've just open-sourced our replacement CodeIgniter PayPal library, called codeigniter-paypal-ipn. (We use this library in production.)
It performs more validation than PayPal_Lib, and it also saves the orders down to your database (using either CI active record or Doctrine).
I hope you find it useful!

There is an existing library for integration with Paypal using CodeIgniter:
http://codeigniter.com/wiki/PayPal_Lib/

I asked the same kind of question here.
And http://www.phpfour.com/blog/2009/02/php-payment-gateway-library-for-paypal-authorizenet-and-2checkout/ is good resource.
Please have a look.

Related

PayPal integration in Laravel site

I need to implement PayPal payment in my Laravel site. I was going for the server side integration, in order to save all the data, transactions and know what they actually bought. But turns out that [the older] server-side integration method [that I was looking at] is archived, and not really the preferred method anymore. Instead, they suggest using the smart buttons, with front end integration only.
Questions:
Is front end only safe? what prevents the user from messing with the JavaScript and editing the sum with whatever they want?
How do I know what they ordered if it is all front end?
What would I have to do if the payed sum does not correspond to the articles in the cart?
What should I be aware of with this system?
Smart Payment Buttons can be used with or without a server-side component.
Here is the front-end pattern that communicates with a server-side integration: https://developer.paypal.com/demo/checkout/#/pattern/server
Notice the fetches to two '/demo/...' placeholder endpoints, which need to be replaced with actual routes of yours. The first should create a v2/order via API and return the orderID. The second should capture that order after the payer approves it via Smart Payment Buttons.
The answers to your questions re: a serverless (client-side only) pattern are:
Nothing
Only what you program the JavaScript to tell you and which it actually successfully tells you, or what you read via email or in your PayPal account or app notifications
Refund the transaction
It's for people who don't want to do the work of implementing server-side routes and API calls.

How can we implement future or split payment using Braintree?

We are working on one website solution for which we require to implement future and/or split payment using the Braintree payment gateway. Is it any possible solution for the same? How can it be implemented?
We also tried to create sub-merchant for splitting a payment but we are getting the following error.
"Master merchant account ID is invalid.".
Any help would be appreciated.
Thanks
Braintree does not offer a marketplace/split-payment function. You would only be able to apply for/use Braintree Direct and any funds would go directly to your bank account. There is no ability to have sub-merchants.
Similarly, PayPal has deprecated their original split-payment/pay-forwarding solution.
I suggest you go with PayPal Marketplace.
PayPal Marketplace is an entirely separate solution and you would need to speak with the PayPal team for specific details.

Other possible ways to integrate 2checkout payment gateway

Is there any way to implement the checkout process aside from the ones found on the 2checkout site? I would like to have my own checkout page in my website and just pass the data to 2checkout instead of redirecting it to 2checkout's checkout page using the inline method.
2Checkout is currently in the process of beta testing their new checkout API solution which allows you to create a token from the card details client side and then submit the token server side with an API call to create a new sale. It sounds like you would be a great candidate for 2Checkout's API beta program. A ruby library and full documentation will be provided to you once you signup.
I think 2checkout sites ruby example has what you are looking for,
see here, or check out this rubygem

Payments in booking system

I am trying to figure out how I can use Paypal to process payments in a booking system I am building. I think Paypal has a very messy documentation, and I can't seem to get a good overview over what to do. Firstly, I'm from Norway, and it seems Paypal has some restrictions when it comes to what kind of solution I can choose. These two are the ones that seem in the right corner:
Website Payments Standard
Express Checkout
What I generally wants is to send the user to paypal. If the payment is confirmed, the user should be sent to a confirmation page. As I understand it, that won't be a problem. But how can my system know that the payment is okay? Is there any id being sent back and forth? The system needs to save some information about the payment in the database.
What solution should I choose?
And how can I associate the payment with the current booking?
Paypal sends response "Verified" for successful payments when you use ipn_url, using this response you can check if the payment is ok or not.
For more info pls check the link:
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_admin_IPNIntro
For Codeigniter you can use paypal library: this might be of help:
https://github.com/orderly/codeigniter-paypal-ipn

codeigniter paypal url

I have downloaded the codeigniter paypal lib. I have few questions regarding this library.
My paypal url is set to this, $this->paypal_url = 'https://www.paypal.com/cgi-bin/webscr', Is it for testing!? How can I change it for actual transactions?!
My return url is set to a success controller, but I am not able to view the post information returned by paypal. Could anyone tell, what exactly is the problem?!
I want to store the transaction details (Amount paid,paid by whom, on what date and for which product), How exactly I can achieve this?
thanks
A lot of my answers relate to the Adaptive Payments API, so apologies if it doesn't correspond 1:1 but hopefully it will point you in the right direction.
The URL you're pointing to is the live site I believe, if you want to run api calls against the sandbox the proper URL is https://www.sandbox.paypal.com/cgi-bin/webscr
The return URL is the page that Paypal redirects to after a transaction or cancel. There is no POST request associated with this, however..you can pass parameters into the URL (such as http://mysite.com/succes.php?amount=xxx) so that you can retrieve them later. This is a rather inconsistent way of doing things, though. Which leads to...
Look up the IPN documentation on Paypal (starting point: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_admin_IPNIntro) This allows you to specify a URL which Paypal will POST the transaction details to after a transaction request.
Before you can store these details you need to do send back a request to Paypal to validate that the IPN was generated from Paypal (this is in the docs). After that you can store the details into your database.

Resources