Hi all,
I have the shopping cart with angularjs and have this part the code for chckout with paypal so the problem is i don t know the mode for have the response back for know if the transaction its complete and success, with angular its possible?
OR
would be that the script could send a notification email
Thanks
// item data
for (var i = 0; i < this.items.length; i++) {
var item = this.items[i];
var ctr = i + 1;
data["itemnumber" + ctr] = item.code;
data["itemname" + ctr] = item.name;
data["quantity" + ctr] = item.quantity;
data["amount" + ctr] = item.price.toFixed(2);
}
// build form
var form = $('<form/></form>');
// form.attr("action", "https://www.paypal.com/cgi-bin/webscr");
form.attr("action", "https://www.sandbox.paypal.com/us/cgi-bin/webscr");
form.attr("method", "POST");
form.attr("style", "display:none;");
this.addFormFields(form, data);
this.addFormFields(form, parms.options);
$("body").append(form);
// submit form
this.clearCart = clearCart == null || clearCart;
form.submit();
form.remove();
Hi all, I have the shopping cart with angularjs and have this part the code for chckout with paypal so the problem is i don t know the mode for have the response back for know if the transaction its complete and success, with angular its possible? OR would be that the script could send a notification email
Thanks
// item data for (var i = 0; i < this.items.length; i++) { var item = this.items[i]; var ctr = i + 1; data["itemnumber" + ctr] = item.code; data["itemname" + ctr] = item.name; data["quantity" + ctr] = item.quantity; data["amount" + ctr] = item.price.toFixed(2); }