Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Manage PAYPAL_POPUP_CLOSED JS error
Browse files Browse the repository at this point in the history
When the customer closes the PayPal popup before completing the payment
process a PAYPAL_POPUP_CLOSED is received. The message is now properly shown
to the customer.
  • Loading branch information
spaghetticode committed Nov 20, 2018
1 parent ce57527 commit f41f6e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/views/spree/shared/_braintree_errors.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script type="text/javascript">
BraintreeError.DEFAULT = "<%= I18n.t('solidus_paypal_braintree.errors.default_error')%>"
BraintreeError.PAYPAL_POPUP_CLOSED: "<%= I18n.t('solidus_paypal_braintree.errors.paypal_popup_closed') %>"
BraintreeError.HOSTED_FIELDS_FIELDS_EMPTY = "<%= I18n.t('solidus_paypal_braintree.errors.empty_fields')%>"
BraintreeError.HOSTED_FIELDS_FIELDS_INVALID = "<%= I18n.t('solidus_paypal_braintree.errors.invalid_fields')%>"
BraintreeError.HOSTED_FIELDS_FAILED_TOKENIZATION = "<%= I18n.t('solidus_paypal_braintree.errors.invalid_card')%>"
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ en:
token: Token
errors:
default_error: "Something bad happened!"
paypal_popup_closed: "PayPal popup has been closed before payment completion."
empty_fields: "All fields are empty! Please fill out the form."
invalid_fields: "Some payment input fields are invalid."
invalid_card: "Credit card data is incorrect."
Expand Down

0 comments on commit f41f6e8

Please sign in to comment.