Php paypal integration Classes - php

I need a php paypal class to inntegrate PayPal payments to my website.
User from form should be able to order the service, it should redirect to paypal pay page and after the payment is done, i should get back the "success" parameter to mysql database with generated invoice number from paypal.
This class seems to work:
simple-paypal-integration-in-php
but there is one problem: after user makes payment, i get "success" status in my db table but the invoice number always being generated different than paypal does. And I don't know why is that. May be you know some better classes i could use to make PayPal payments or how to fix that class.
Thank You!

please use paypal adaptive payment api it is very simple to implements in your projects

Related

Paypal notify_url in invoice PayPal-PHP-SDK

i'm using CreateInvoice.php this code for creating paypal invoices. But problem is just like express checkout and formal paypal checkout i can't figure out how to add notify_url , cancel_url, return_url while creating invoices.
And in samples i can't find how to accomplish this job.
The parameters you are asking about are not relevant to the invoicing API.
notify_url is to specify an IPN URL. The REST API does not use IPN, though. Instead, it uses Webhooks. You can register those manually within your REST App in your PayPal developer account, or you can set them up with the API.
cancel_url and return_url are used with things like the checkout APIs so that PayPal knows where to send the user when they make those actions. The CreateInvoice invoice API would not need this, though, because there is no redirect to PayPal / login happening with the user.
Instead, it's simply using your API credentials to create the invoice and give you a success or fail result. Based on that result you can redirect wherever you want. Again, you're never leaving your app in this case, so you don't need to specify where to be sent back.
Hope that helps.

Create a subscription from a previous transaction

This is an Authorize.net question...I am looking for a way to create a subscription from a previous payment a customer has made through an API call or another way instead of having to login to the Merchant Interface. I have done some research but currently have not found a way to do this. Is this possible?
Also, in the Merchant Interface, there is a "View Rebillable Transactions" button that allows you to submit a charge to a card the customer has used in the past. Is it possible to have this same functionality using an API?
Any help is appreciated!
Not yet. It's something they are considering but as of right now you can only do it either using the ARB API by making it immediately or doing it through the merchant interface.

PayPal adaptive payment success function

I am new to sandbox and paypal payment gateway. I am using paypal adaptive payment to pay amount to two people at a time. My current code works perfectly. I am using the paypal generated code. I just want to know that is it possible that when the payment is made successfully can I make that entry to my database. I have my php code, but where do I need to write this?
Thanks in advance(plzz no down votes)
You should wait for the IPN message that contain details about the payment status
https://www.paypal.com/ipn
You need to define the url of the php script that listen for those messages in your paypal account. There are some php examples on how to implement it.

is it possible to purchase a product using curl php library and paypal?

i have a client that provide a service on his website.he wants to automate the service orders.
the service has these steps:
1- user submit a form with request.
2- my client review the request, validate it and use the info in this request to :
3- login to another website
4- buy a product from this website using his paypal account.
5- downlad and send the product in email to the user.
i was able to automate all of this using curl.the only problem i have is the purchase process using papal.i didn't deal with paypal before.so i want to know if i can just submit the papal form on the purchase website using curl.or this will not work?
while searching i found something about papal IPN.but i don't know if my client have this IPN in his papal account or not? also, he does not want to give me his papal info. is there is anyway i can do this with fake paypal account to try it?
thank you so much.
First of all, sign up for a PayPal sandbox account: https://developer.paypal.com/devscr?cmd=_signup-run
It's a really slick system PayPal put together for developers to test out stuff.
Secondly, review the PayPal API's at:
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/library_download_sdks
I believe all you need is the PHP Name-Value pair or Website Payments Standard interfaces.
IPN stands for Instant Payment Notification, it's a way for PayPal to tell you that a payment was made.
What you are looking for is either the PayPal NVP or SOAP interfaces.

Which payment method do I need to use for PHP PayPal API?

I need to setup a payment method on my website that allows a certain user to pay another via two email address'. So essentially, user1 comes to a page, downloads an invoice and has the option to pay that invoice using a link which redirects to paypal with the prefilled details i.e. payeremail, receiveremail, amt, currencycode. Does anyone know which API call I need to make to do this? All I can really see in the API is for other users to pay my account which I already have setup for another function. Thanks in advance.
You need PayPal IPN, after the payment goes through you will receive following information https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_IPNandPDTVariables
Here is PHP handler for the IPN, http://www.boolcast.com/development/joomla-custom-paypal-ipn
You can also look at other sample code example on PayPal site.

Categories