Skip to content

Paypal Integration kit for DIRECT PAYMENT and EXPRESS CHECKOUT methods.

Notifications You must be signed in to change notification settings

ravishanker404/Paypal-Integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Paypal-Integration

Paypal Integration kit for DIRECT PAYMENT method and EXPRESS CHECKOUT method.

Demo is given in the pages testDirectPayment.php and testExpressCheckout.php respectively.

For Use simply configure the merchant details in the page PaymentGateway/PaypalAbstract.php then

For DirectPayment

  1. Set the return urls and create a DirectPayment object which takes the amount as the param. $Paypal = new DirectPayment(23);

  2. Set the credit card details

    setCreditCardNumber("4539644852839411");
    setCVV("123")
    setCardType("VISA")
    setExpDate("MMYYYY")

  3. Set the optional billing information. Then the method doPayment() will return the parsed paypal response as an array.

For ExpressCheckout

  1. Set the Expresscheckout by

     `$Paypal = new ExpressCheckout($amount);//Amount`
     `$Paypal->doPayment();`
    
  2. The page will be redirected to paypal

  3. In the return page call the method DoExpressCheckoutPayment

    `$Paypal = new ExpressCheckout($amount);//Amount`
    
    `$response = $Paypal->DoExpressCheckoutPayment($_REQUEST);`
    

NOTE: For lesser versions of php remove the namespaces before using.

TODO: Implement Paypal Parallel Payments Using Express Checkout and Recurring payment

About

Paypal Integration kit for DIRECT PAYMENT and EXPRESS CHECKOUT methods.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages