diff --git a/app/javascript/components/DonationBands/__snapshots__/DonationBands.test.js.snap b/app/javascript/components/DonationBands/__snapshots__/DonationBands.test.js.snap index 85344ab84..7135aa200 100644 --- a/app/javascript/components/DonationBands/__snapshots__/DonationBands.test.js.snap +++ b/app/javascript/components/DonationBands/__snapshots__/DonationBands.test.js.snap @@ -154,6 +154,8 @@ exports[`renders all amounts with the currency symbol 1`] = ` "fundraiser.one_click_failed": "We're sorry but we could not process your donation. Please try again with a different card.", "fundraiser.one_click_warning": "Your donation will be processed immediately.", "fundraiser.oneclick.credit_card_payment_method": "{card_type} ending in {last_four_digits}", + "fundraiser.oneclick.duplicate_donation": "You've just made a donation a few minutes ago. Are you sure, you want to donate again? We're doing this to make sure you don't accidentally donate twice. +Thanks so much for everything you do!", "fundraiser.oneclick.new_payment_method": "Add payment method", "fundraiser.oneclick.paypal_payment_method": "Paypal ({email})", "fundraiser.oneclick.select_payment": "Select a saved payment method", @@ -591,6 +593,8 @@ exports[`renders correctly 1`] = ` "fundraiser.one_click_failed": "We're sorry but we could not process your donation. Please try again with a different card.", "fundraiser.one_click_warning": "Your donation will be processed immediately.", "fundraiser.oneclick.credit_card_payment_method": "{card_type} ending in {last_four_digits}", + "fundraiser.oneclick.duplicate_donation": "You've just made a donation a few minutes ago. Are you sure, you want to donate again? We're doing this to make sure you don't accidentally donate twice. +Thanks so much for everything you do!", "fundraiser.oneclick.new_payment_method": "Add payment method", "fundraiser.oneclick.paypal_payment_method": "Paypal ({email})", "fundraiser.oneclick.select_payment": "Select a saved payment method", diff --git a/app/javascript/components/ExpressDonation/ExpressDonation.js b/app/javascript/components/ExpressDonation/ExpressDonation.js index 3e3121a73..b47d8e279 100644 --- a/app/javascript/components/ExpressDonation/ExpressDonation.js +++ b/app/javascript/components/ExpressDonation/ExpressDonation.js @@ -42,6 +42,7 @@ type State = { submitting: boolean, openPopup: boolean, opt_for_redonation: boolean, + failureReason: string, }; export class ExpressDonation extends Component { @@ -55,6 +56,7 @@ export class ExpressDonation extends Component { submitting: false, openPopup: false, opt_for_redonation: false, + failureReason: '', }; } @@ -94,6 +96,7 @@ export class ExpressDonation extends Component { openPopup: reason.responseJSON ? reason.responseJSON.immediate_redonation : false, + failureReason: reason.responseJSON.message, }); this.props.setSubmitting(false); ee.emit('fundraiser:transaction_error', reason, this.props.formData); @@ -223,7 +226,7 @@ export class ExpressDonation extends Component { >
- + {this.state.failureReason}