Here is one way:
First, you will need a Payments Pro merchant account at PayPal. Then check out the DoDirectPayment API , which allows you to process transactions on your site using PayPal in the background. Customers will be able to fill out information about their credit card, etc. On your site without visiting PayPal directly.
This also means that customers are not required to have a PayPal account to complete a transaction on your site.
If you continue this path, you will need SSL certificates and will need to perform an express check for customers who do not want to make transactions on your site.
Sample code to keep your feet wet. Good luck
source share