npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@solidgate/angular-sdk

v1.12.0

Published

This is a wrapper for Solidgate Client SDK

Downloads

146

Readme

Solidgate Angular SDK

This is a wrapper for Solidgate Client SDK

Installation

Run inside Angular project

npm i @solidagate/angular-sdk

Usage

Payment form

Add SolidPaymentModule to your feature (or app module)

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { SolidPaymentModule } from '@solidgate/angular-sdk';

import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    SolidPaymentModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Render a component

Component inputs and outputs are described in the docs

https://docs.solidgate.com/payments/integrate/payment-form/create-your-payment-form/

<ngx-solid-payment
    [merchantData]="merchantData"
    [googlePayButtonParams]="googlePayParams"
    (mounted)="log($event)"
    (interaction)="log($event)"
    (customStylesAppended)="log($event)"
    width="50%"
></ngx-solid-payment>

In order to render google/apple button in custom container pass link to container element

<ngx-solid-payment
    [merchantData]="merchantData"
    [googlePayContainer]="googlePay"
    [applePayContainer]="applePay"
    [paypalContainer]="paypalButton"
></ngx-solid-payment>
<div #googleButton></div>
<div #appleButton></div>
<div #paypalButton></div>

To use your own submit flow disable form button trough formParams in your component

import {InitConfig} from '@solidgate/angular-sdk'

formParams: InitConfig['formParams'] = {
  allowSubmit: false
}

Then subscribe to sdk instance and use submit method when you need it

<ngx-solid-payment
  [merchantData]="merchantData"
  [formParams]="formParams"
  (readyPaymentInstance)="sdkInstance = $event"
></ngx-solid-payment>

<button 
  *ngIf="!!sdkInstance" 
  (click)="sdkInstance?.submit()"
>
  Submit
</button>

If you need current validation state use iteraction event and cache it

Resign form

Add SolidResignModule to your feature (or app module)

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { SolidResignModule } from '@solidgate/angular-sdk';

import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    SolidResignModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Render a component

Component inputs and outputs are described in the docs

https://docs.solidgate.com/payments/integrate/payment-form/resign-payment-form/

<ngx-solid-resign
  [resignRequest]="resignRequest"
  [appearance]="appearance"
  [container]="container"
  [styles]="styles"
  (mounted)="log($event)"
  (interaction)="log($event)"
></ngx-solid-resign>

The handling of the custom submit flow is identical to that of the payment form, with the exception of the event name that passes the SDK instance.

import {ResignFormConfig} from '@solidgate/angular-sdk'

appearance: ResignFormConfig['appearance'] = {
  allowSubmit: false
}
<ngx-solid-resign
  [resignRequest]="resignRequest"
  [appearance]="appearance"
  (mounted)="log($event)"
  (interaction)="log($event)"
  (readyResignInstance)="sdkInstance = $event"
></ngx-solid-resign>

<button 
  *ngIf="!!sdkInstance" 
  (click)="sdkInstance?.submit()"
>
  Submit
</button>