Closed mehul0810 closed 5 years ago
@kevinwhoffman @DevinWalker As per the quick look on the issue, this is a rare scenario when a donor has email access token expired and then tried to donate. We are looking into it. However, no customer has reported such issue till date.
Participants: @mehul0810 @kevinwhoffman Topic: Discussion about the issue Results: We have discussed the possible solutions to fix the issue and finalized to go with the one @ravinderk suggested to restrict the access token notice to be displayed only on donation history and confirmation page only. Implementing this will be a quick fix and the issue will get resolved as well.
Hi all. Thanks in advance for any help.
I'm trying to develop a custom plugin, and I'm seeing this issue appear when email access token expires. In further tracing what is gets submitted at the following line:
I get the following data via var_dump($_REQUEST);
:
{ ["action"]=> string(34) "give_donation_form_reset_all_nonce" ["give_form_id"]=> string(1) "8" }
For full details, within my plugin:
I'm calling preventDefault
on the form submission:
document.addEventListener( 'DOMContentLoaded', function( e ) {
console.log("merchantid: ", jQuery( this ).find( 'input[name="give-form-merchantid"]' ).val());
jQuery( 'body' ).on( 'submit', '.give-form', function( event ) {
const $form = jQuery( this );
const $idPrefix = $form.find( 'input[name="give-form-id-prefix"]' ).val();
const $merchantId = $form.find( 'input[name="give-form-merchantid"]' ).val();
if ( 'payengine' === $form.find( 'input.give-gateway' ).val() ) {
tokenRequest(this, $merchantId);
event.preventDefault();
}
} );
});
2. Once I obtain the token for payment, I retrigger the for submit like this:
var successCallback = function(formElement, data) {
console.log("successCallback: ", data.token);
const $form = jQuery( formElement );
$form.find( 'input[name="give-form-payengine-cardtoken"]' ).val(data.token);
formElement.submit();
return
};
Hi all. Thanks in advance for any help.
I'm trying to develop a custom plugin, and I'm seeing this issue appear when email access token expires. In further tracing what is gets submitted at the following line:
I get the following data via
var_dump($_REQUEST);
:{ ["action"]=> string(34) "give_donation_form_reset_all_nonce" ["give_form_id"]=> string(1) "8" }
For full details, within my plugin:
- I'm calling
preventDefault
on the form submission:document.addEventListener( 'DOMContentLoaded', function( e ) { console.log("merchantid: ", jQuery( this ).find( 'input[name="give-form-merchantid"]' ).val()); jQuery( 'body' ).on( 'submit', '.give-form', function( event ) { const $form = jQuery( this ); const $idPrefix = $form.find( 'input[name="give-form-id-prefix"]' ).val(); const $merchantId = $form.find( 'input[name="give-form-merchantid"]' ).val(); if ( 'payengine' === $form.find( 'input.give-gateway' ).val() ) { tokenRequest(this, $merchantId); event.preventDefault(); } } ); });
- Once I obtain the token for payment, I retrigger the for submit like this:
var successCallback = function(formElement, data) { console.log("successCallback: ", data.token); const $form = jQuery( formElement ); $form.find( 'input[name="give-form-payengine-cardtoken"]' ).val(data.token); formElement.submit(); return };
Hello @spartakb, I understand you are having an issue with email access tokens expiring. Given that the current issue is marked as Closed, we ask that you create a new GH Discussion for this conversation. This will allow us to better manage/record what is going on and also bring more attention into a solution. Feel free to reference the current issue in the discussion if you feel it may be related.
Bug Report
User Story
As a user, I want to process the donations properly so that donors receive a consistent UX.
Currently, I'm unable to process a successful donation when a cookie generated via email access link is expired and we are using the same browser to process a donation. Then, the error notice for access token expired which should be shown on the email access page is restricting the donation to process successfully. Hence, this is a rare scenario. Check the error message in the screenshot below. Also, check the possible solution section and let me know your thoughts
Current Behavior
I'm unable to process donations using Stripe CC
Expected Behavior
We should be able to process donation without any errors.
Bug Type
Steps to Reproduce
give_nl
Possible Solution
We're already redirecting to the email access page asking for email which on submission creates a new cookie. Now, when the cookie is expired. I suggest removing the access token expired notice and unset the existing cookie which is expired to avoid this rare scenario from happening on the donation form page.
Visuals
Related
Acceptance Criteria