The checkout page and Braintree integration
We are going to receive payments from two sources: PayPal and credit/debit cards. We are going to use the Braintree services to collect payments from both sources. For that, we are going to use braintree-angular
. Let's install it:
bower install braintree-angular#1.3.1 --save
Then add it to our app dependencies:
angular.module('meanshopApp', [
'ngCookies',
'ngResource',
'ngSanitize',
'btford.socket-io',
'ui.router',
'ui.bootstrap',
'ngFileUpload',
'ngCart',
'braintree-angular'
])
Now that we have the route, let's create the template and the controller. The following is the content for the template:
<!-- client/app/products/templates/products-checkout.html --> <navbar></navbar> <div class="container"> <div ...
Get Web Application Development with MEAN now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.