1.4.1 • Published 2 years ago

@jeremybarbet/nest-iap v1.4.1

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

@jeremybarbet/nest-iap

Wrapper around iap library to embed in NestJS applications.

Installation

yarn add @jeremybarbet/nest-iap

Usage

import { IAPModule } from '@jeremybarbet/nest-iap';

@Module({
  controllers: [...],
  providers: [...],
  imports: [
    IAPModule.forRoot({
      apple: {
        password: '',
      },
      google: {
        clientEmail: '',
        privateKey: '',
      },
    }),
  ],
})
import { IAPService } from '@jeremybarbet/nest-iap';

class MyService {
  constructor(private readonly iapService: IAPService) {}

  async someMethod() {
    const { response } = await this.iapService.verifyAppleReceipt({
      transactionReceipt: 'BASE_64_RECEIPT',
    });
  }

  async someOtherMethod() {
    const { response } = await this.iapService.verifyGoogleReceipt({
      packageName: 'PACKAGE_NAME',
      token: 'TOKEN',
      productId: 'PRODUCT_ID',
    });
  }
}

License

This library is licensed under the MIT License.

1.4.1

2 years ago

1.4.0

2 years ago

1.3.6

3 years ago

1.2.0

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.1

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.1

3 years ago