ngx-ycpay v1.0.11
Installation
To install the last active version:
npm install ngx-ycpay@latestNotice
This library is a reserve until the youcan teams create a library for angular
This package is only a short module for integration youcanpay card in your angular
You need to import
https://youcanpay.com/js/ycpay.jsto your angular.jsonThis package required your smile before installation 😏
If you dont know angular.json (im also dont know 😅 ) follow me with this steps 1. go to your project 2. scroll down behind of package.json you will see angular.json (if you don't know package.json this library is not recommended for you) 3. is not important step 4. open angular.json 5. projects -> project-name -> architect -> options -> scripts 6. oh wow we finish
Using the library
- Import the
NgxYcpayModuleinto your application - Import the
NgxYcpayModuleinto your application - Import the
NgxYcpayModuleinto your application - Import the
NgxYcpayModuleinto your application
Repetition for Accessibility Knowledge 🍪

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
// Import the library
import { NgxYcpayModule } from 'ngx-ycpay';
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
ReactiveFormsModule,
NgxYcpayModule,
LibraryModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {}Now go to your component and 🤙 call <ngx-ycpay [yc-publicKey]="'publicKey'"></ngx-ycpay>
other params not required:
| Name | Default Value |
|---|---|
| yc-form | ycForm |
| yc-lang | en |
| yc-error | ycError |
| yc-class | empty |
| class | yc-group |
The ngx-ycpay has only one event i call him Pay for more explination when user click pay the event will emit a instance of YCPay in (Pay)="" Event
// component.html
<ngx-ycpay [yc-publicKey]="'publicKey'" (Pay)="MyMethodForCreatToken($event)"></ngx-ycpay>// component.ts
MyMethodForCreatToken(ycPay){
ycPay.pay(tokenId)
.then(successCallback)
.catch(errorCallback);
}Donation
Lah yrheem lawalidin is enough 👌