Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PaymentServer
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
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Administrator
PaymentServer
Commits
e2ba9ef9
Commit
e2ba9ef9
authored
5 years ago
by
Ramakrishnan Muthukrishnan
Browse files
Options
Downloads
Patches
Plain Diff
report an error for failed payments
parent
98d11b32
No related branches found
Branches containing commit
No related tags found
1 merge request
!30
Expose a browser facing API for charge
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/PaymentServer/Processors/Stripe.hs
+2
-1
2 additions, 1 deletion
src/PaymentServer/Processors/Stripe.hs
with
2 additions
and
1 deletion
src/PaymentServer/Processors/Stripe.hs
+
2
−
1
View file @
e2ba9ef9
...
@@ -35,6 +35,7 @@ import Servant
...
@@ -35,6 +35,7 @@ import Servant
(
Server
(
Server
,
Handler
,
Handler
,
err400
,
err400
,
ServerError
(
errBody
)
,
throwError
,
throwError
)
)
import
Servant.API
import
Servant.API
...
@@ -154,4 +155,4 @@ charge d key (Charges token voucher amount currency) = do
...
@@ -154,4 +155,4 @@ charge d key (Charges token voucher amount currency) = do
Right
(
Charge
{})
->
do
Right
(
Charge
{})
->
do
liftIO
$
payForVoucher
d
voucher
liftIO
$
payForVoucher
d
voucher
return
Ok
return
Ok
Left
(
StripeError
{})
->
throwError
err400
Left
(
StripeError
{})
->
throwError
err400
{
errBody
=
"Stripe charge didn't succeed"
}
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