keep a track of paypal payment made online - php

My question may seem to be very basic and view dependent but i wish to know every aspect of it.
I have created a mobile app where the users need to register themselves in order to use the app, but my client wishes to have the admin panel in the form of a website, where the user can register themselves by paying a specific amount through paypal and then they can use the mobile app version.
I have completed the main page and have created the paypal button on the user page, but for the admin page i wish to show a list of all users who have successfully paid for the product.
Is it possible to do so, can i keep a track of user details and their payments on the website??? if yes then can anyone guide me with it, would appreciate some help

use Paypal IPN to save the paypal transaction information to your database.

Use a database. Save each payment record after payment maybe.

Related

Can I sell subscriptions without subscription button using Pay Pal

I have website on which I want to sell subscriptions. Here is the scenario:
In the pricing tables there is button purchase. When user click on the button I am sending him to the form where he can enter his details (name, email, password) . When visitor click on the submit button his account is created and I want to redirect him to the pay-pal page, where the user can make the payment.
Can anyone point me to some article on pay-pal page where I can read instructions how can I do that, and which model/api/gateway/whatever I should use for that? I know how to create subscription buttons, but using them doesn't seem to fit in my scenario-flow. Please note that I need help to FIND information how this can be done, I will find my way with the coding.
PayPal supports multiple ways to sell subscriptions.
You can use one of these depending on type of complexity you can handle and features you want:
PayPal WPS Subscription Buttons
https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/#recurring-payment-variables
This is a button integration, you can specify your subscription terms and PayPal will take care of making recurring payments. You can also maintain inventory, profile & loss tracking. This will require very less coding effort from your end.
API Integration: https://developer.paypal.com/docs/integration/direct/billing-plans-and-agreements/
This is an API integration: Here you need to create a Plan and redirect the buyer to paypal to get buyer's approval. Then you can do recurring payments via API calls. You will need to maintain a secure database of approval ids, buyer details and the agreement details. Also you will need a daemon which should call PayPal apis on subscription dates.
You can also refer to this guide to get more info on different flows supported by paypal: https://developer.paypal.com/docs/directory/

Paypal login session then saves it for faster checkout

Well, I was wondering if it is possible to automatically logins the user in paypal everytime they checks out?
Given the scenario a new user registers in my site.
New User->Logins to paypal->get permissions(etc..)->approve->gets back to my site
So, everytime the user checks-out it automatically logins in paypal.
I would like to link his paypal account to his profile in my site thus easier check out
I saw the documents but it is just too much for me to comprehend.
It sounds like you are referring to reference transactions. With PayPal you can create a billing agreement, and you would save the billing agreement ID to the local user record in your database.
In the future when they are logged in and checking out on your site you can pull the billing agreement ID and pass that into a reference transaction request to PayPal. This will immediately process the new payment without any approval necessary, so you can simply display the order complete page to the user.
Their experience would be choosing their saved payment method, clicking to buy, and the complete page would show up immediately. No checkout forms or login (other than logging in to your site) necessary.
Depending on whether you're working with the Classic API or REST the specific calls would be different, but "reference transactions" and "billing agreements" are the terms you're looking for.

how do i link paypal account with online store using php

I am not sure what this is called but here is what i am looking to do.
I am trying to make a php script that will create a link between our store account and paypal buyer, so that when they click our buy button it will process the payment without any future confirmations or user actions.
I have tried the paypal sdks and integration wizard no luck, Does anyone know of a working example of what i am trying to do?
Billing agreement(also called Reference Transactions) allows customer to agree the payment once on your website or app, then you call an API with the billing agreement ID to tell PayPal to charge the customer. Please see document here . You will need to contact PayPal to enable you to use Billing agreement, it's not easy to get approval:(
Integrating Paypal buttons are pretty straightforward.
Go to your merchant account.
Go to your Create Paypal Button page.
Choose whatever the button types you want. Configure it with Price etc.
Now just copy and paste the code generated.
It just works.
P.S
There is an option in your merchant account page to set the returning address from Paypal. You can set a returning page and catch all the transaction details via HTTP Post method when it is called by Paypal.
There is this Sandbox account type in Paypal which you can do a lot of playing with.

How to intergrate paypal into an application?

Im planning to allow people to create premium accounts on a site. There is a simple registration form, at the end of which I want to direct people to paypal where they will make a payment, and then be sent back to my site with their newly created account now activated (if transaction went thru).
I dont want a fully hosted solution ("Website Payments Pro"), but something where you leave the site, and then come back to it after payment.
Everything you need to get started
View sample code
View all tech docs
Download SDKs
API Reference
Using the PayPal API, you'll be able to send users to PayPal to handle payments. Once the transaction has been completed it will then send a response to a script on your site, which you can then act on accordingly. For example, update a particular user's status as 'Paid' or 'Unpaid' in your members database table.
You want to look at PayPal IPN. With that, you can send these pages URLs as hidden fields and PayPal will then return the user to the page you submitted for success, failed, IPN handler etc.
Yes that's possible, look into the "Buy now"-method on PayPal, they have an off-site payment possibility and they have on-site payment. It's up to you how much you want to spend on both time and percentage on each sale.

how can i use Paypal for premium section of my site and deal with premium vs normal users?

I want to achieve something like this
http://depositfiles.com/en/gold/payment.php
I have normal users signed up. I want them to upgrade to premium user. Once a person pays, how do I know which user he was signed in ? How do i force the user to login first before being able to click the paypal button and make payment ? Otherwise, I would receive money, but wouldn't know which user to mark as "PAID" in my database.
when you click on the paypal button, it redirects you to the paypal page where you can login and pay.
I also want to accept Visa and Mastercards, is it doable through paypal using the same method ?
Paypal's information can be found here:
Part 1
You can create a subscribe button for each type of subscription you want and use the HTML variables in Part 2 to enable you to know what type of product and what user is included in the invoice.
This needs a lot more details than you currently provide. What language have you written your website in? Static HTML? Ruby? PHP? How does PayPal's payment system work?
normally the way it will work is that your site will pass information to paypal (http://paypal.sourceforge.net/ is one toolkit that seems to be made for php, thought I've never used it so I can't really promise its not abandonware).
once the paypal transaction is completed successfully, control is passed back to your site. you can then set the user's flag in your database as a premium user.
as far as I can tell, you tell paypal to handle payments for you, and the user picks a funding source in paypal. if you want to have visa/mastercard separately handled from paypal you'll need another payment gateway to handle it, like mirapay or something else.

Categories