PHP Payment es una librería PHP para realizar pagos en tres de las plataformas de pagos Paypal, Authorize.net y 2Checkout haciendo el proceso de pago bastante sencillo, como por ejemplo para Paypal:
// 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();
PHP Payment Library for Paypal, Authorize.net and 2Checkout (2CO)
Yo uso otro funcion como reemplazo de var_dump (extraida de CakePHP) que aunque no tiene colores presenta la informacion bastante ordenada:
[code]
function debug($var = false, $showFrom = true) {
if ($showFrom) {
$calledFrom = debug_backtrace();
$file = str_replace(‘\\’, ‘/’, $calledFrom[0][‘file’]);
echo ‘‘ . $file . ‘‘;
echo ‘ (line ‘ . $calledFrom[0][‘line’] . ‘)’;
}
echo “\n\n”;
$var = print_r($var, true);
echo $var . “\n\n”;
}
[/code]
Bueno la clase esta interesante y muy practica, gracias por publicar un post con la info.
Saludos.
Gracias Gabriel por el script.
Domingo, espero que te sea de utilidad
Yo suelo utilizar la función fb de FirePHP, un complemento de Firebug:
http://www.firephp.org/