Skip to content

Conversation

@avonville
Copy link
Contributor

@bwmarkle Code provided from mahesh prior to departure that fixed the transaction table issue. Also included emogrifier updates. Made sure that the code does not disrupt previous/pending merges with regards to weSerialize and PHP8 fixes (emogrifier regex update).

To test broken state:
SCRIPT_DEBUG must be enabled to use the non-minified file.

From the master branch:

Create a payment form and proceed through the payment process.
image

** Note fix to frontend-form.js is added (weSerialize) or the form would not submit. **

  • Payment information
    email: elanad@inmotionhosting.com
    card: 4242 4242 4242 4242
    exp date: 04/24
    cvc: 424
    name: 424242424
    zip: 90245

The transaction table id shows as zero instead of the entry id created in the entries table.

To Test Fix:

SCRIPT_DEBUG must be enabled to use the non-minified file.

From the Payment issue 70 branch:

Use the form created above and submit the entry and payment.

You will see that the transaction table id matches the entry id created

@avonville avonville added this to the 1.6.7 milestone May 24, 2021
};

$.fn.extend({
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spacing of /**

Should look like this:

/**
 * Short description. (use period)
 */

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the method we're duplicating, both on the frontend and backend? If so, maybe a @todo comment mentioning this and we should fix it one day.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bwmarkle This should be removed and the @todo should be added to #89

$post_data = wp_unslash( $_POST );
if ( isset( $post_data['form_data'] ) ) {
parse_str( sanitize_text_field( wp_unslash( $post_data['form_data'] ) ), $form_data );
parse_str( sanitize_text_field( wp_unslash( $post_data['form_data'] ) ), $form_data );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for the extra space added.

}

// Fire a hook for integration
//Fire a hook for integration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a mahesh change. But from what I see it was to make sure the entry is created/not created depending on the settings prior to any redirects after the form is submitted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this talking about the space after // , this has been updated with the most recent commit.

Comment on lines 771 to 772
'form_id' => $form_id,
'page_id' => $page_id,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why were the spaces removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, added them back so that they line up

@bwmarkle bwmarkle merged commit 4f12590 into master May 25, 2021
@bwmarkle bwmarkle deleted the Payment-Issue-70 branch May 25, 2021 12:15
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

Successfully merging this pull request may close these issues.

4 participants