Paypal provides an easy way to integrate its express checkout solution but what is the best solution to use this solution in an angular2 project working written in typescript?>
you can implement paypal checkout with angular 4 like this :
import { Component, OnInit } from '@angular/core';
declare let paypal: any;
@Component({
selector: 'app-page-offers',
templateUrl: './page-offers.component.html',
styleUrls: ['./page-offers.component.sass']
})
export class PageOffersComponent implements OnInit {
constructor() {}
ngOnInit() {
$.getScript( 'https://www.paypalobjects.com/api/checkout.js', function() {
paypal.Button.render({
[...]
})
[...]
Enjoy :)