Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stripe payment failure response - Issue - Value too big #81

Open
gitstephanferriggi opened this issue Apr 30, 2024 · 0 comments
Open

Stripe payment failure response - Issue - Value too big #81

gitstephanferriggi opened this issue Apr 30, 2024 · 0 comments

Comments

@gitstephanferriggi
Copy link

Hello. We are testing Stripe payments and when we have a failure on the card. Card declined or any other general decline we are having this error:

Error Log 077c2f8d5d: 'Title' (Traceback (most recent call last): File "apps/payments/payments/payment_gateways/doctype/stripe_settings/stripe_settings.py", line 220, in create_charge_on_stripe charge = stripe.Charge.create( ^^^^^^^^^^^^^^^^^^^^^ File "env/lib/python3.11/site-packages/stripe/api_resources/abstract/createable_api_resource.py", line 22, in create response, api_key = requestor.request("post", url, params, headers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "env/lib/python3.11/site-packages/stripe/api_requestor.py", line 122, in request resp = self.interpret_response(rbody, rcode, rheaders) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "env/lib/python3.11/site-packages/stripe/api_requestor.py", line 373, in interpret_response self.handle_error_response(rbody, rcode, resp.data, rheaders) File "env/lib/python3.11/site-packages/stripe/api_requestor.py", line 152, in handle_error_response raise err stripe.error.CardError: Request req_z6MHWDd1fV8ANc: Your card was declined. ) will get truncated, as max characters allowed is 140
Error Log 106e958d35: 'Title' (Traceback (most recent call last): File "apps/payments/payments/payment_gateways/doctype/stripe_settings/stripe_settings.py", line 220, in create_charge_on_stripe charge = stripe.Charge.create( ^^^^^^^^^^^^^^^^^^^^^ File "env/lib/python3.11/site-packages/stripe/api_resources/abstract/createable_api_resource.py", line 22, in create response, api_key = requestor.request("post", url, params, headers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "env/lib/python3.11/site-packages/stripe/api_requestor.py", line 122, in request resp = self.interpret_response(rbody, rcode, rheaders) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "env/lib/python3.11/site-packages/stripe/api_requestor.py", line 373, in interpret_response self.handle_error_response(rbody, rcode, resp.data, rheaders) File "env/lib/python3.11/site-packages/stripe/api_requestor.py", line 152, in handle_error_response raise err stripe.error.CardError: Request req_z6MHWDd1fV8ANc: Your card was declined. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "apps/payments/payments/payment_gateways/doctype/stripe_settings/stripe_settings.py", line 202, in create_request return self.create_charge_on_stripe() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "apps/payments/payments/payment_gateways/doctype/stripe_settings/stripe_settings.py", line 236, in create_charge_on_stripe frappe.log_error(frappe.get_traceback()) File "apps/frappe/frappe/utils/error.py", line 76, in log_error return error_log.insert(ignore_permissions=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "apps/frappe/frappe/model/document.py", line 292, in insert self._validate() File "apps/frappe/frappe/model/document.py", line 578, in _validate self._validate_length() File "apps/frappe/frappe/model/base_document.py", line 969, in _validate_length self.throw_length_exceeded_error(df, max_length, value) File "apps/frappe/frappe/model/base_document.py", line 1006, in throw_length_exceeded_error frappe.throw( File "apps/frappe/frappe/init.py", line 645, in throw msgprint( File "apps/frappe/frappe/init.py", line 610, in msgprint _raise_exception() File "apps/frappe/frappe/init.py", line 561, in _raise_exception raise exc frappe.exceptions.CharacterLengthExceededError: Error Log 077c2f8d5d: 'Title' (Traceback (most recent call last): File "apps/payments/payments/payment_gateways/doctype/stripe_settings/stripe_settings.py", line 220, in create_charge_on_stripe charge = stripe.Charge.create( ^^^^^^^^^^^^^^^^^^^^^ File "env/lib/python3.11/site-packages/stripe/api_resources/abstract/createable_api_resource.py", line 22, in create response, api_key = requestor.request("post", url, params, headers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "env/lib/python3.11/site-packages/stripe/api_requestor.py", line 122, in request resp = self.interpret_response(rbody, rcode, rheaders) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "env/lib/python3.11/site-packages/stripe/api_requestor.py", line 373, in interpret_response self.handle_error_response(rbody, rcode, resp.data, rheaders) File "env/lib/python3.11/site-packages/stripe/api_requestor.py", line 152, in handle_error_response raise err stripe.error.CardError: Request req_z6MHWDd1fV8ANc: Your card was declined. ) will get truncated, as max characters allowed is 140 ) will get truncated, as max characters allowed is 140

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant