Clase PHP para pagos de Paypal PHP, Programación - 3 de March de 2009 | 12:22 pm | 3 Comentarios



Si necesitas crear aplicaciones con pagos mediante Paypal y no te quieres romper la cabeza viendo su documentación o creando botones o herramientas que son muy tardadas. Ve la siguiente clase muy fácil de utilizar.

 
// Include the paypal library
include_once ('Paypal.php');
 
// Create an instance of the paypal library
$myPaypal = new Paypal();
 
// Specify your paypal email
$myPaypal->addField('business', 'YOUR_PAYPAL_EMAIL');
 
// Specify the currency
$myPaypal->addField('currency_code', 'USD');
 
// Specify the url where paypal will send the user on success/failure
$myPaypal->addField('return', 'http://YOUR_HOST/payment/paypal_success.php');
$myPaypal->addField('cancel_return', 'http://YOUR_HOST/payment/paypal_failure.php');
 
// Specify the url where paypal will send the IPN
$myPaypal->addField('notify_url', 'http://YOUR_HOST/payment/paypal_ipn.php');
 
// Specify the product information
$myPaypal->addField('item_name', 'T-Shirt');
$myPaypal->addField('amount', '9.99');
$myPaypal->addField('item_number', '001');
 
// Specify any custom value
$myPaypal->addField('custom', 'muri-khao');
 
// Enable test mode if needed
$myPaypal->enableTestMode();
 
// Let's start the train!
$myPaypal->submitPayment();

Libreria PHP PAYMENT LIBRARY | Via sentidoweb.com



3 Responses to “Clase PHP para pagos de Paypal”

  1. juan says:

    muy bueno!!!, les comparto un pack de manuales para conectar paypal con php, talvez les sirva :) .

  2. juan says:

    ahi lo tienen: se me olvido jeje.
    http://depositfiles.com/files/mkzybtu7p

  3. miguel says:

    donde esta el Paypal.php ?

Leave a Reply