Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MetaGer Keymanager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
MetaGer Keymanager
Commits
c6cb384c
Commit
c6cb384c
authored
2 years ago
by
Dominik Hebeler
Browse files
Options
Downloads
Patches
Plain Diff
fixed expiration date for manual charges
parent
02469400
No related branches found
No related tags found
No related merge requests found
Pipeline
#7390
passed
2 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pass/app/PaymentReference.js
+10
-7
10 additions, 7 deletions
pass/app/PaymentReference.js
with
10 additions
and
7 deletions
pass/app/PaymentReference.js
+
10
−
7
View file @
c6cb384c
...
...
@@ -197,7 +197,7 @@ class PaymentReference {
}
resolve
(
parseInt
(
matcher
[
2
])
-
config
.
get
(
"
price.number_range.payment_reference
"
)
config
.
get
(
"
price.number_range.payment_reference
"
)
);
});
}
...
...
@@ -313,14 +313,17 @@ class PaymentReference {
/**
* Charges the key without creating a Payment (Manual Charge)
*
* @returns
*
* @returns
*/
async
chargeKey
()
{
return
this
.
getKey
(
true
).
then
(
key
=>
{
key
.
charge_key_order
(
this
.
amount
,
this
.
id
,
dayjs
().
add
(
config
.
get
(
"
keys.expiration_days
"
),
"
days
"
));
return
key
.
save
();
})
return
this
.
getKey
(
true
).
then
((
key
)
=>
{
let
expiration
=
dayjs
().
add
(
config
.
get
(
"
keys.expiration_days
"
),
"
days
"
);
return
this
.
setExpiration
(
expiration
).
then
(()
=>
{
key
.
charge_key_order
(
this
.
amount
,
this
.
id
,
expiration
);
return
key
.
save
();
});
});
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment