From 9146d72d72de9d027698a0c1025dd8c5525d6573 Mon Sep 17 00:00:00 2001 From: andysg012 Date: Tue, 25 Oct 2022 13:33:54 +0800 Subject: [PATCH] fix: update zero amount validation --- Xendit/XDTCards.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xendit/XDTCards.swift b/Xendit/XDTCards.swift index b495e3e..9f40352 100644 --- a/Xendit/XDTCards.swift +++ b/Xendit/XDTCards.swift @@ -231,7 +231,7 @@ public class XDTCards: CanTokenize, CanAuthenticate { } - guard tokenizationRequest.amount.doubleValue > 0 else { + guard tokenizationRequest.amount.doubleValue >= 0 else { return XenditError(errorCode: "VALIDATION_ERROR", message: "Amount must be a number greater than 0") }