Veran, me gustaria hacerles una consulta, me gustaria implementar una clase para integrar PayPal como metodo de pago en linea, esta es la clase:
http://paste2.org/p/798595
Y se utiliza asi:
Código PHP:
<?php
// 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', '[email protected]');
// Specify the currency
$myPaypal->addField('currency_code', 'USD');
// Specify the url where paypal will send the user on success/failure
$myPaypal->addField('return', 'http://www.pagina.com/paypal_success.php');
$myPaypal->addField('cancel_return', 'http://www.pagina.com/paypal_failure.php');
// Specify the url where paypal will send the IPN
$myPaypal->addField('notify_url', 'http://www.pagina.com/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();
?>
En la parte de:
Código PHP:
// Specify the product information
$myPaypal->addField('item_name', 'T-Shirt');
$myPaypal->addField('amount', '9.99');
$myPaypal->addField('item_number', '001');
Estoy haciendo una tiendita y normalmente a los productos los llamo asi:
Código PHP:
$cart = $_SESSION['carro'];
foreach($cart as $k => $v){
// aki llamo a los productos con $v
}
Desde ya mil gracias chicos !!!!