Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PERFORMA_REPLICA
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Usman
PERFORMA_REPLICA
Commits
ac615652
Commit
ac615652
authored
Mar 21, 2019
by
Nilu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
S25645689 # Client - Incoming Issues (raised by Client) #Click Open Jobs gives "Stripe error".
parent
7adbc77e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
StripeUtils.java
cmsWebApp/src/performa/utils/StripeUtils.java
+11
-3
No files found.
cmsWebApp/src/performa/utils/StripeUtils.java
View file @
ac615652
...
...
@@ -403,14 +403,23 @@ public class StripeUtils
{
try
{
CurrencyType
currency
=
hiringTeam
.
getCountry
().
getCurrency
();
int
amount
=
NullArith
.
intVal
(
NullArith
.
multiply
(
hiringTeam
.
getPPJAmount
(
job
),
100
,
0
d
));
int
minAmount
=
currency
==
CurrencyType
.
GBP
?
300
:
500
;
// Stripe has a min amount for charge GBP 0.30 and other AUD, UAD, CAD, SGD, EUR 0.50
if
(
amount
>=
minAmount
)
{
Map
<
String
,
Object
>
chargeParams
=
new
HashMap
<>();
chargeParams
.
put
(
"amount"
,
NullArith
.
intVal
(
NullArith
.
multiply
(
hiringTeam
.
getPPJAmount
(
job
),
100
,
0
d
)));
chargeParams
.
put
(
"currency"
,
hiringTeam
.
getCountry
().
getCurrency
());
chargeParams
.
put
(
"amount"
,
amount
);
chargeParams
.
put
(
"currency"
,
currency
);
chargeParams
.
put
(
"description"
,
"Charges of creating job"
);
chargeParams
.
put
(
"customer"
,
hiringTeam
.
getStripeReference
());
Charge
.
create
(
chargeParams
);
}
}
catch
(
StripeException
e
)
{
LogMgr
.
log
(
LoggingArea
.
ALL
,
LogLevel
.
PROCESSING1
,
e
,
"Error while making a payment of hiringTeam stripe "
+
hiringTeam
.
getStripeReference
());
...
...
@@ -420,7 +429,6 @@ public class StripeUtils
}
public
static
void
handleWebhook
(
HttpServletRequest
request
,
ObjectTransaction
objTran
)
throws
FieldException
{
try
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment