2 PHP Classes to use the paypal in your site

Discussion in 'PHP' started by astkboy2008, Dec 22, 2009.

  1. #1
    hello agian
    this classes is an attempt to simply the process of integrating Website Payments Pro into an PHP web application
    :D

    first class
    PHPpaypal 0.5.2

    phpPayPal is an attempt to simply the process of integrating Website Payments Pro into an PHP web application. It is a single class developed for PHP5 to integrate Website Payments Pro using the Name-Value Pair API from PayPal.

    Current Features:


    • DoDirectPayment
    • SetExpressCheckout
    • GetExpressCheckoutDetails
    • DoExpressCheckoutPayment
    • GetTransactionDetails
    • RefundTransaction
    Planned Features:


    • DoAuthorization
    • DoCapture
    • DoReauthorization
    • DoVoid
    • TransactionSearch
    • SetCustomerBillingAgreement
    • GetBillingAgreementCustomerDetails
    • CreateRecurringPaymentsProfile
    • DoReferenceTransaction
    download as zip file
    phpPayPal.0.5.2.zip [14.94 KB]
    for browse the class
    phpPayPal.0.5.2.php [64.18 KB]
    and the php exampless
    the second class
    PayPal Checkout Class 1.0


    Implementation of simple Paypal Express Checkout in PHP.

    PayPal allows their users to implement checkout functions using their API. But implementing the full API is not a piece of cake. There are some libraries on the web, but the most of them are paid, closed or too complex.


    If you wanna implement simple and single-item payments (i.e. "pay for service" or "pay for source code"), you can use my, free and open, library described here.


    This library was written as a part of my framework, but it's usable standalone too, I hope.
    Using is as easy as
    $r = new PayPal();
    $r->doExpressCheckout(10, 'Da Greatest Library You Ever Seen');
    PHP:
    $final = $r->doPayment();
    
    if ($final['ACK'] == 'Success') {
            echo 'Succeed!';
    } else {
            echo 'Error!';}
    
    PHP:
    download
    PayPal-Checkout-1.0.zip [6.16 KB]

     
    astkboy2008, Dec 22, 2009 IP
  2. insert

    insert Peon

    Messages:
    148
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    thanks for sharing!
     
    insert, Dec 23, 2009 IP
  3. astkboy2008

    astkboy2008 Peon

    Messages:
    211
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks mr.insert
     
    astkboy2008, Dec 23, 2009 IP