Miren tengo el siguiente codigo
Código Javascript
:
Ver originalpaypal.Buttons({
style: {
color: 'gold',
shape: 'pill',
label: 'pay',
height: 35
},
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: document.getElementById("monto").value
},
custom: "15",
reference_id: document.getElementById("reference_id").value,
description: "Folio "+document.getElementById("reference_id").value
}]
});
},
onApprove: function(data, actions) {
// Capture the funds from the transaction
return actions.order.capture().then(function(details) {
});
}
}).render('#paypal-button-container');
eso hace que page bien y todo
pero no hallo la manera de añadirle mas de 1 item..
siempre sale un item, y quiero que aparezca desglosado
intente esto
Código Javascript
:
Ver originalpurchase_units: [{
amount: {
value: document.getElementById("monto").value
},
custom: "15",
reference_id: document.getElementById("reference_id").value,
description: "Producto 15 "+document.getElementById("reference_id").value
},{
amount: {
value: document.getElementById("monto").value
},
custom: "16",
reference_id: "16"+document.getElementById("reference_id").value,
description: "Producto 16 "+document.getElementById("reference_id").value
}]
pero nada...cuando hago eso no se envia el pago
¿alguien ha hecho esto?
de antemano gracias