PayPal Adaptive Payments Pro PayFlow CodeIgniter Library

PayPal Adaptive Payments Pro PayFlow CodeIgniter Library

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

  • Language: PHP
    Framework: CodeIgniter
  • Released: Feb 21, 2011
    Last Update: Jan 19, 2014

Now Available on GitHub!

Important Notice

This CodeIgniter specific version of this class library is no longer being maintained. It will remain here in its current state, but all future updates and maintenance will be focused on our standard library.

The standard library is now fully compatible with Composer and available on Packagist so you may use it in CodeIgniter or any other framework you wish.

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
You need to log-in or create an account
  • Create an account
  • Log-in
Please use your real name.
Activation link will be sent to this address.
Minimum 8 characters
Enter your password again

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

X

Save your watchlist

Fill your details below to receive project updates from your watch list - including new versions, price changes and discounts.

I agree to the terms of use and privacy policy.

License » GNU GPL Download
or Get a quote

for customization or integration services

  • From what I have seen this seems to be a good library but there is major lack of support. For a beginner, it is very hard to integrate this library. It would be wise to do a full course, from the point of creating the paypal buy now button, to the point of the final step in the purchase, because many people do not understand how to implement and how to use this tools.
    VC Victor C
    2 years ago, 0 comments
    Was this helpful?
    Flag 4 of 4 people found this review helpful
  • Great overall library. Well built and documented. I am concerned with this setting in your cURL method, however:

    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);

    SSL Verify Peer, and Verify Host should absolutely be turned on when shipping CC numbers over the internet. This is neither secure, compliant, or best practice. You basically are not confirming that the receiving host is paypal, or that the receiving cert is up to date. Although this setting makes it easier to integrate, it is setting up devs to implement PayPal quickly without proper security. This is partially PayPal's fault, as they do the same thing in their sample code. (Likely to avoid support headaches on their side) The library should really have the more secure settings, and force developers to do the extra security setup of choosing and including a cacert file to use with cURL:

    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, TRUE);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
    curl_setopt($curl, CURLOPT_CAINFO, "/path/to/cacert.pem");

    It's really not that much extra work, and helps make the interwebs safer for all :).

    See these articles for a proper explanation of using cURL securely to communicate with secure sites:

    http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/

    http://artur.ejsmont.org/blog/content/how-to-properly-secure-remote-api-calls-from-php-application
    OH Oliver Holmberg
    6 months ago, 0 comments
    Was this helpful?
    Flag 1 of 1 people found this review helpful
  • Good
    VS Victor Sokolov
    2 years ago, 0 comments
    Was this helpful?
    Flag 0 of 1 people found this review helpful
Post a comment

Or enter your name and Email
  • EJ Ebenezer Jolaoso 1 month ago
    Hi Andrew, I have been trying to set this up for quite a bit but am getting a blank page. I have modified the config files to reflect the correct values. Any help in the right direction would be greatly appreciated. Regards Eb
    • Andrew Angell Developer 1 month ago
      A blank page means you have a PHP error of some sort happening but you must not have PHP errors enabled for display on your server. Adjust that in your php.ini or with ini_set() and then you should get a better error to lead you where the problem is. Alternatively, you could check out your raw web server logs and they should show you the same info.
    • EJ Ebenezer Jolaoso 1 month ago
      Thanks Andrew for your quick response. I really appreciate it. I managed to fix that. It has to do with the config file. The sample request displays now but i have this massive error as below. [ERRORS] => Array ( [0] => Array ( [L_ERRORCODE] => 10501 [L_SHORTMESSAGE] => Invalid Configuration [L_LONGMESSAGE] => This transaction cannot be processed due to an invalid merchant configuration. [L_SEVERITYCODE] => Error ) ) I have actually google quite a fair bit for the error code returned. And my account config credential is correct. I do have a premium pro account and the accept payment has been enable on the paypal development website. Please advice on what to do. Thanks. Eb
    • Andrew Angell Developer 4 weeks ago
      Invalid Merchant Configuration means you don't have DoDirectPayment enabled on the PayPal account you're working with. Have you applied for and been approved for Payments Pro? If so, it could be that you need to be using PayFlow instead of DoDirectPayment. That just depends on which version of Pro they put you into.
  • UC umesh c 2 months ago
    Fatal error: Cannot redeclare PayPal_Pro::GetBillingAgreementCustomerDetails() ..I m facing this issue what could i do?
    • Andrew Angell Developer 2 months ago
      Which version of the library are you using? The 2.42 version resolved this issue. All you need to do is open up /application/libraries/paypal/Paypal_pro.php and do a search for the GetBillingAgreementCustomerDetails function. You'll find two of them. Just remove one of those and that problem will go away.
  • SD sheetal deshpande 6 months ago
    Hi, I am facing problem in payflow express checkout with session timeout. Has anyone know the steps and parameters for express checkout integration using payflow.
    • Andrew Angell Developer 6 months ago
      Is there any particular reason you want to integrate Express Checkout with PayFlow specifically? There's no requirement to do that. The regular EC API will work just fine even if you're on Payments Pro with PayPal Manager. If you do want to stick to PayFlow, you can do that with my class, but I just don't have templates setup quite as nicely for that as I do the regular EC API's. PayPal's Express Checkout for PayFlow documentation covers all the parameters in depth, though: https://www.paypalobjects.com/webstatic/en_US/developer/docs/pdf/pfp_expresscheckout_pp.pdf
    • SD sheetal deshpande 6 months ago
      I have already using your class for normal EC, but now my client is using paypal pro 2.0 and support person told us that we need to use now payflo pro. When I tried to use normal EC the transaction goes in my sandbox and not in pyapal manager account. So I was trying to set up express checkout with payflow . By the way I have set up your payflow class with recurring billing as well using Credit card. Do you need it to upgrade your library?
    • Andrew Angell Developer 6 months ago
      The library can handle it all, I just don't have all the templates setup for PayFlow like I do the original PayPal API.