refactor(server): payment service (#8906)

This commit is contained in:
forehalo
2024-12-05 08:31:00 +00:00
parent 4fe1b5ba93
commit 4055e3aa67
26 changed files with 1934 additions and 1537 deletions
@@ -72,11 +72,13 @@ export class SubscriptionStore extends Store {
const data = await this.gqlService.gql({
query: resumeSubscriptionMutation,
variables: {
idempotencyKey,
plan,
},
context: {
signal: abortSignal,
headers: {
'Idempotency-Key': idempotencyKey,
},
},
});
return data.resumeSubscription;
@@ -90,11 +92,13 @@ export class SubscriptionStore extends Store {
const data = await this.gqlService.gql({
query: cancelSubscriptionMutation,
variables: {
idempotencyKey,
plan,
},
context: {
signal: abortSignal,
headers: {
'Idempotency-Key': idempotencyKey,
},
},
});
return data.cancelSubscription;
@@ -118,10 +122,14 @@ export class SubscriptionStore extends Store {
return this.gqlService.gql({
query: updateSubscriptionMutation,
variables: {
idempotencyKey,
plan,
recurring,
},
context: {
headers: {
'Idempotency-Key': idempotencyKey,
},
},
});
}