WesternFriend / westernfriend.org

A website for Western Friend (westernfriend.org), a Quaker publication that provides resources and support for Quaker communities and individuals seeking to live out their faith in the world. Western Friend is part of the Religious Society of Friends.
https://westernfriend.org
GNU Affero General Public License v3.0
57 stars 39 forks source link

Disable "Pay" button until payment form appears or is filled in completely #757

Closed brylie closed 11 months ago

brylie commented 1 year ago

On the Payment page, we render a Braintree payment element above a Pay button within a form. However, there is some delay when rendering the payment element. This delay may confuse users who might submit the form prematurely. Instead, we should disable the "Pay" button until at least the payment element renders. The "Pay" button should be disabled until the payment widget is filled in and validated. Check for a callback event for the Braintree payment widget where we can toggle the disabled property on the "Pay" button. Otherwise, we must figure out how to ensure the element is rendered at least before enabling the "Pay" button.

Screenshot 2023-07-04 at 19 37 12

https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v3

At first glance, we may be able to listen for the paymentMethodRequestable event to toggle the disabled state of the Pay button.

https://developer.paypal.com/braintree/docs/guides/drop-in/customization/javascript/v3/#events https://braintree.github.io/braintree-web-drop-in/docs/current/Dropin.html#on

Also, make sure we are using the latest Braintree JavaScript SDK.

hr07exploiter commented 1 year ago

Hey! @brylie, I want to contribute Please assign me.

kiranrokkam09 commented 1 year ago

I would like to contribute to this issue. Is anybody working with it?

hr07exploiter commented 1 year ago

We are working on it.

On Wed, 4 Oct 2023 at 23:54, kiranrokkam09 @.***> wrote:

I would like to contribute to this issue. Is anybody working with it?

— Reply to this email directly, view it on GitHub https://github.com/WesternFriend/WF-website/issues/757#issuecomment-1747421433, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQKCW63VOBH46WAGCHVF2SLX5WSXTAVCNFSM6AAAAAAZ56SSH2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBXGQZDCNBTGM . You are receiving this because you were assigned.Message ID: @.***>

brylie commented 1 year ago

Yesterday, I met with @marycklein and we decided not to use Braintree any longer. We will use PayPal instead. Currently, I'm working to port our payment code over to use PayPal instead of Braintree. Would you like to assist with the PayPal payment solution?

hr07exploiter commented 1 year ago

Sure, no problem.

On Thu, 5 Oct 2023 at 20:12, Brylie Christopher Oxley < @.***> wrote:

Yesterday, I met with @marycklein https://github.com/marycklein and we decided not to use Braintree any longer. We will use PayPal instead. Currently, I'm working to port our payment code over to use PayPal instead of Braintree. Would you like to assist with the PayPal payment solution?

— Reply to this email directly, view it on GitHub https://github.com/WesternFriend/WF-website/issues/757#issuecomment-1749049762, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQKCW63A3EJDE7MO242EJ4LX53BLTAVCNFSM6AAAAAAZ56SSH2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBZGA2DSNZWGI . You are receiving this because you were assigned.Message ID: @.***>

brylie commented 11 months ago

No longer relevant