Commit ac615652 by Nilu

S25645689 # Client - Incoming Issues (raised by Client) #Click Open Jobs gives "Stripe error".

parent 7adbc77e
......@@ -403,14 +403,23 @@ public class StripeUtils
{
try
{
CurrencyType currency = hiringTeam.getCountry().getCurrency();
int amount = NullArith.intVal(NullArith.multiply(hiringTeam.getPPJAmount(job), 100, 0d));
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, 0d)));
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment