angular / angular.js

AngularJS - HTML enhanced for web apps!
https://angularjs.org
MIT License
58.82k stars 27.51k forks source link

Angular paypall response #7229

Closed corsaronero closed 10 years ago

corsaronero commented 10 years ago

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(); 
pkozlowski-opensource commented 10 years ago

@corsaronero please direct support questions to one of the channels listed here: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#question