Fixed rounding problem in stripe integration (#10645)
This commit is contained in:
parent
2d9e441cd0
commit
5f86884031
1 changed files with 2 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ import frappe
|
|||
from frappe.model.document import Document
|
||||
from frappe import _
|
||||
from six.moves.urllib.parse import urlencode
|
||||
from frappe.utils import get_url, call_hook_method, cint
|
||||
from frappe.utils import get_url, call_hook_method, cint, flt
|
||||
from frappe.integrations.utils import make_get_request, make_post_request, create_request_log, create_payment_gateway
|
||||
|
||||
class StripeSettings(Document):
|
||||
|
|
@ -62,7 +62,7 @@ class StripeSettings(Document):
|
|||
"Bearer {0}".format(self.get_password(fieldname="secret_key", raise_exception=False))}
|
||||
|
||||
data = {
|
||||
"amount": cint(self.data.amount)*100,
|
||||
"amount": cint(flt(self.data.amount)*100),
|
||||
"currency": self.data.currency,
|
||||
"source": self.data.stripe_token_id,
|
||||
"description": self.data.description
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue