Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate checkout form before sending request to PayPal #137

Merged
merged 20 commits into from
Apr 6, 2021

Conversation

strangerkir
Copy link
Contributor

Issue: PCP-75.


Description

Changes the create order process so the checkout form validated before sending create order request to PayPal. This prevents cases of sending incomplete data to PayPal and getting errors from there.

Steps to test:

  1. Add any product to the cart.
  2. Go to the checkout page.
  3. Select PayPal as a payment method.
  4. Fill the checkout form except for one required field (e.g. City/Town).
  5. Submit the checkout.

You should see the standard WooCommerce error like "Town / City is a required field." instead of an error like
"[UNPROCESSABLE_ENTITY] The requested action could not be performed..." that is returned from PayPal.

Documentation

  • This PR needs documentation (has the "Documentation" label).

Changelog entry

Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.

  • Fix - Checkout form validation.

Closes #115.

@strangerkir strangerkir marked this pull request as ready for review March 17, 2021 12:06
@strangerkir strangerkir requested a review from Dinamiko March 17, 2021 12:06
@Dinamiko Dinamiko merged commit 5d1979b into trunk Apr 6, 2021
@Dinamiko Dinamiko deleted the PCP-75-validate-form-before-sending-paypal-request branch April 6, 2021 09:20
@Dinamiko Dinamiko mentioned this pull request Apr 8, 2021
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.

paypal pending payment issue
2 participants