GNU GPL FREE

The GNU GPL is an
open-source license.
Read full license

You need to log-in or create an account
  • Create an account
  • Log-in
  • Please use your real name.
  • Account activation link will be sent to this address.
  • Minimum 8 characters

Clicking this button confirms you read and agreed to the terms of use and privacy policy.

(35 ratings)

PayPal Adaptive Payments Pro PayFlow CodeIgniter Library

A custom library for CodeIgniter that provides access to all PayPal NVP, Authentication, Permissions, Adaptive Payments, and PayFlow API's.

Share and win up to $15k in prizes each month!Learn more

Share

Description

Overview
This library includes all of the PayPal NVP API calls as well as Adaptive Payments, Invoicing, Adaptive Accounts, Permissions, and PayFlow.

The controller includes "template" methods for every call that includes all of the possible parameters that can be passed into that particular call. 

All you have to do is fill in the blank parameters in the array templates and pass that into the library method.  An array will be returned with all of the response fields from PayPal as well as a few extra fields for troubleshooting purposes.

PayPal Payments Pro

  • AddressVerify
  • BillAgreementUpdate
  • BillOutstandingAmount
  • CreateRecurringPaymentsProfile
  • DoAuthorization
  • DoCapture
  • DoDirectPayment
  • DoExpressCheckoutPayment
  • DoMobileCheckoutPayment
  • DoNonReferencedCredit
  • DoReauthorization
  • DoReferenceTransaction
  • DoVoid
  • GetAccessPermissionsDetails
  • GetAuthDetails
  • GetBalance
  • GetBillingAgreementCustomerDetails
  • GetExpressCheckoutDetails
  • GetTransactionDetails
  • ManagePendingTransactionStatus
  • ManageRecurringPaymentsProfileStatus
  • MassPay
  • RefundTransaction
  • SetAccessPermissions
  • SetExpressCheckout
  • SetMobileCheckout
  • TransactionSearch
  • UpdateAccessPermissions
  • UpdateRecurringPaymentsProfile

PayPal Adaptive Payments

  • AddBankAccount
  • AddPaymentCard
  • CancelInvoice
  • CancelPermissions
  • CancelPreapproval
  • CreateAccount
  • CreateAndSendInvoice
  • CreateInvoice
  • ExecutePayment
  • GetAccessToken
  • GetAdvancedPersonalData
  • GetBasicPersonalData
  • GetFundingPlans
  • GetInvoiceDetails
  • GetPaymentOptions
  • GetPermissions
  • GetShippingAddress
  • GetVerifiedStatus
  • MarkInvoiceAsPaid
  • Pay
  • PaymentDetails
  • Preapproval
  • PreapprovalDetails
  • Refund
  • RequestPermissions
  • SearchInvoices
  • SendInvoice
  • SetFundingSourceConfirmed
  • SetPaymentOptions
  • UpdateInvoice
  • BMButtonSearch

PayPal PayFlow

  • Authorization
  • Balance Inquiry
  • Credit
  • Delayed Capture
  • Voice Authorization
  • Inquiry
  • Data Upload
  • Duplicate Transaction
  • Sale
  • Void
Read all 114 comments »

Questions & Comments

Leave a comment

You must be logged-in to leave a comment.
Log-in now or register for a free account.
  • Victor Gem said:

    2 weeks ago
    I think people are quite into Recurring Payments those days but there’s very little information on the internet. I want to setup regular membership subscription on my website and wonder if you would know what are the steps I should follow to get the functionality working using your library. I know I should submit the data using Recurring Payment API but there are a number of methods and I’m not sure what’s the correct business logic.
    • Andrew Angell Author said:

      2 weeks ago
      I'm sorry for the delay getting back to you.

      The flow really depends on the method you're using to setup the subscriptions. My library handles all of it, but you gotta know what features of PayPal you're using.

      Are you using Payments Pro so you can accept credit card sign-ups directly (without any redirect through PayPal) or are you just going to be using Express Checkout?

      Payments Pro costs $30/mo and then another $30/mo for the recurring aspect of it, so it can be rather costly. Express Checkout is free other than transaction fees, of course.

      With Express Checkout the flow would be to call SetExpressCheckout and make sure to include the billing agreement parameters. This will give you back a TOKEN and then you redirect the user over to PayPal accordingly. The user signs in to their PayPal account and agrees to continue. PayPal then sends them back to your ReturnURL that you included with SetExpressCheckout.

      Here, you can call GetExpressCheckoutDetails to obtain the buyer information from PayPal (optional). You can then call CreateRecurringPaymentsProfile using the token you got back in SEC. As long as you included the billing agreement info with your SEC request this will work just fine and create the profile accordingly.

      If you are using Payments Pro (DoDirectPayment) then you would just use CreateRecurringPaymentsProfile by itself and include credit card details within that request instead of a token.

      If you're using Payments Pro (PayFlow) then you would just use the PayFlow request directly and set the parameters to setup a recurring profile.

      Hope that helps!
  • Peter Weston said:

    2 months ago
    Is there a discount variable available?
    • Andrew Angell Author said:

      1 month ago
      Hi Peter. Sorry for the delay getting back to you. The only parameter PayPal provides that really has anything to do with a discount is the shipping discount in Express Checkout. That's not really intended for a shopping cart discount, though. In most cases you'll simply need to include the discount as a line item on the transaction with a negative amount. Make sure your math calculates correctly so that the ITEMAMT + TAXAMT + HANDLINGAMT + SHIPPINGAMT = AMT.
  • afzal said:

    2 months ago
    how will come to know that payment done successfully or not ???
    • Andrew Angell Author said:

      2 months ago
      Hi Afzal,

      Check the value of the ACK parameter that comes in the result. This will be either Success, SuccessWithWarning, Failure, or FailureWithWarning.
You must be logged-in to vote. Log-in to your account or register now.
View all 26 reviews »

User Reviews