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

PayPal Provider #13

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

PayPal Provider #13

wants to merge 2 commits into from

Conversation

0vol
Copy link

@0vol 0vol commented Oct 6, 2023

Description

Added implementation of a payment provider service using Paypal's Checkout Server SDK.

  • ProviderService Class: extends an abstract service and implements a payment interface. It has two main methods: createACheckoutSession and checkRequestAndReturnDetails.

  • createACheckoutSession Method: creates a new checkout session for a transaction, sets up the details of the transaction, such as the amount and currency, and then sends a request to PayPal to create a new order. If successful, it returns the order ID.

  • checkRequestAndReturnDetails Method: This method takes a request (which should contain an order ID) and sends a request to PayPal to get the details of that order. If successful, it returns the order details.

  • client Function: a helper function that creates and returns a new instance of PayPalHttpClient.


Issue Ticket Number

Fixes #4


Type of change

  • Bug fix
  • New Provider
  • Styling
  • New Feature

Checklist:

  • I have checked to ensure there aren't other open Pull Requests for the same update/change?
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes needed to the documentation

@0vol
Copy link
Author

0vol commented Oct 6, 2023

Dependency: @paypal/checkout-server-sdk - For interacting with PayPal's Checkout APIs

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.

[Payment Provider] Paypal
1 participant