I resolved this problem using this documentation the old StripeService.
import { Group } from '@app/shared/models/group';
import { GroupService } from '@app/shared/services/api-services/group.service';
export class DetailsComponent implements OnInit {
groupType: Group;
constructor(
private groupService: GroupService,
private stripeApiService: StripeApiService,
private stripeService: StripeService)
{ }
ngOnInit() {
this.service.getGroup(this.storedUser.Group).subscribe(group => {
this.groupType = group;
if(group.AccountType === 'China_Account'){
this.stripeService.setKey(environment.MY_PUBLIC_KEY_CH);
} else {
this.stripeService.setKey(environment.MY_PUBLIC_KEY_US);
}
})
}}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…