78 lines
1.3 KiB
TypeScript
78 lines
1.3 KiB
TypeScript
import { Injectable, NotImplementedException } from '@nestjs/common';
|
|
import type { IWechatProvider, WechatWxaCodeUnlimitedInput } from './wechat.interface';
|
|
|
|
@Injectable()
|
|
export class WechatDisabledProvider implements IWechatProvider {
|
|
isEnabled() {
|
|
return false;
|
|
}
|
|
|
|
isMock() {
|
|
return false;
|
|
}
|
|
|
|
isPayEnabled() {
|
|
return false;
|
|
}
|
|
|
|
getMchId() {
|
|
return '';
|
|
}
|
|
|
|
private disabled(): never {
|
|
throw new NotImplementedException('FEATURE_DISABLED');
|
|
}
|
|
|
|
code2Session() {
|
|
return this.disabled();
|
|
}
|
|
|
|
oauth2AccessToken() {
|
|
return this.disabled();
|
|
}
|
|
|
|
fetchOAuthUserInfo() {
|
|
return this.disabled();
|
|
}
|
|
|
|
createJssdkConfig() {
|
|
return this.disabled();
|
|
}
|
|
|
|
buildOAuthUrl() {
|
|
return this.disabled();
|
|
}
|
|
|
|
getPhoneNumberByCode() {
|
|
return this.disabled();
|
|
}
|
|
|
|
createJsapiPrepay() {
|
|
return this.disabled();
|
|
}
|
|
|
|
createNativePrepay() {
|
|
return this.disabled();
|
|
}
|
|
|
|
parsePayNotification() {
|
|
return this.disabled();
|
|
}
|
|
|
|
getWxaCodeUnlimited(_input: WechatWxaCodeUnlimitedInput): Promise<Buffer> {
|
|
return this.disabled();
|
|
}
|
|
|
|
uploadShippingInfo() {
|
|
return this.disabled();
|
|
}
|
|
|
|
getOrderShippingInfo() {
|
|
return this.disabled();
|
|
}
|
|
|
|
getDeliveryList() {
|
|
return this.disabled();
|
|
}
|
|
}
|