@yci/payments
v1.0.0
Published
[![Build Status](https://travis-ci.org/yc-ionic/payments.svg?branch=master)](https://travis-ci.org/yc-ionic/payments.svg?branch=master) [![Coverage Status](https://coveralls.io/repos/github/yc-ionic/payments/badge.svg?branch=master)](https://coveralls.io/
Downloads
2
Readme
@yci/payments
Installation
- Install the Ionic plugin
npm i -S @yci/payments
- Add it to your app’s NgModule.
// Import your library
import { PaymentsModule } from '@yci/payments';
@NgModule({
...
imports: [
...
// Specify your library as an import
PaymentsModule.forRoot()
],
...
})
export class AppModule { }
Usage
Once your library is imported, you can use its service in your Angular application:
import { Payments } from '@yci/payments';
constructor(private payments: Payments) {
payments.addChannel('alipay', async charge => {
// ...
});
// pay
payments.pay(target)
}
Development
To generate all *.js
, *.d.ts
and *.metadata.json
files:
$ npm run build
License
MIT © Yu Chen