1.0.11 • Published 2 years ago

ngx-ycpay v1.0.11

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Installation

To install the last active version:

npm install ngx-ycpay@latest

Notice

This library is a reserve until the youcan teams create a library for angular

  1. This package is only a short module for integration youcanpay card in your angular

  2. You need to import https://youcanpay.com/js/ycpay.js to your angular.json

  3. This 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

  1. Import the NgxYcpayModule into your application
  2. Import the NgxYcpayModule into your application
  3. Import the NgxYcpayModule into your application
  4. Import the NgxYcpayModule into your application

Repetition for Accessibility Knowledge 🍪

image

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:

NameDefault Value
yc-formycForm
yc-langen
yc-errorycError
yc-classempty
classyc-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 👌

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.1

2 years ago