Skip to content

indiebase/mbdpay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

面包多支付 SDK

支持nestjs

Usage

const pay = new MbdPay('appId', 'appKey');

pay.aliPay({
  url: '',
  description: '',
  amount_total: 0,
});

MbdPay

Nestjs

@Module({
  imports: [
     MbdPayModule.forRoot({
      appId: 'xxxxxx',
      appKey: 'xxxxxx',
    }),
    MbdPayModule.forRootAsync({
      imports: [ConfigModule],
      inject: [ConfigService],
      useFactory(config: ConfigService) {
        return {
          appId: config.get('mbd.appId'),
          appKey: config.get('mbd.appKey'),
        };
      },
    }),
  ]
})
export class AppModule {
  constructor(
    private readonly mbdPayService: MbdPayService,
  ) {
    mbdPayService.client.aliPay({
      url: '',
      description: '',
      amount_total: 0,
    });
  }
}

About

mbdpay typescript sdk and supports nestjs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published