javascript - PayPal Angular Integration -


i have angular application, need integrate paypal payment process. i've been following tutorials, stuck this.

what i've done until now?

  1. run 'npm install xcomponent'
  2. run 'npm instal paypal-checkout'
  3. add <scriptsrc="https://www.paypalobjects.com/api/checkout.js"></script> index.html
  4. add <paypal-button [props]="{ payment: payment, onauthorize: onauthorize }"></paypal-button> page need button rendered
  5. at app.module.ts, exported , imported (in ngmodule imports list) new module this:

    declare const paypal:any; export const paypalbuttonmodule = paypal.button.driver('angular2',{component,ngmodule,elementref,ngzone});

  6. add component (lets call mypaypalcomponent.ts) need render button:

    payment() { console.log('payment'); } onauthorize() { console.log("onauthorize"); }

and button being rendered, next step? how to, @ mypaypalcomponent.ts, "overload" functions payment, onauthorize , oncancel, make work?


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -