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

feat: enrollment creation when an order is processed #40

Merged
merged 6 commits into from
Sep 25, 2023

Conversation

julianramirez2
Copy link
Contributor

@julianramirez2 julianramirez2 commented Sep 18, 2023

Description

A functionality has been created that allows a WooCommerce order, which has already been paid and is in the 'processing' state, to automatically create an Enrollment Request with the order information. In this case, the email used for processing will be the one associated with the billing information of the order.

This pull request includes only the 'happy path,' which means it works when all the information is correct and handles very basic errors. In other words, if there is a failure in the API request, it will be displayed in the notes, but if there are other types of errors, there is a possibility that the process may be interrupted.

Testing instructions

To test it:

  1. Go to the test product: https://stagingwoocommerceplugin.kinsta.cloud/?product=curso-de-pruebas-paypal
  2. Click on the 'Add to Cart' button.
  3. Click on the 'View Cart' button in the popup.
  4. Click 'Proceed to Checkout.'
  5. Change the user's email to a correct one, such as [email protected], or a different one to test the case where it's incorrect.
  6. Click on the 'PayPal' button.
  7. For the email, enter: [email protected], and for the password: Sg="6{SA
  8. Click 'Pay.'
  9. Check the order in WooCommerce and its notes.

Additional information

This is how a successful order looks like:

image

In the event of a failure in the Open edX API request, you will see the error message at the location indicated by the arrow on the right side of the screen.

Checklist for Merge

  • Tested in a remote environment
  • Updated documentation
  • Rebased master/main
  • Squashed commits

@julianramirez2
Copy link
Contributor Author

@andres-arango-aptitude @MaferMazu can you check this, please?

Copy link
Contributor

@MaferMazu MaferMazu left a comment

Choose a reason for hiding this comment

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

It looks good, but please resolve the @andres-arango-aptitude feedback before merging this.

@julianramirez2 julianramirez2 merged commit 729ae47 into main Sep 25, 2023
3 checks passed
@felipemontoya felipemontoya deleted the payment-handler branch March 21, 2024 17:32
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.

3 participants