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

Implement Stripe payment processing #163

Merged
merged 2 commits into from
Aug 23, 2024

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Aug 23, 2024

This pull request was created by Sweep to resolve the following request by @curtisdelicata:

finish stripe implementation. use stripe tokens for payments don't store credit card locally.

Continue chatting at https://sweep-chat-demo.vercel.app/c/0c1253f3-4a08-43c7-8281-baf03fae1819.

Purpose

This pull request adds the ability to process payments using the Stripe payment gateway. This will allow customers to pay for invoices using their credit cards.

Description

The changes in this pull request include:

  1. Implementing the processStripePayment method in the PaymentGatewayService class. This method retrieves the Stripe token from the payment data, sets up the Stripe API key, and creates a Stripe charge using the token. It then updates the payment status and transaction ID in the database.

  2. Updating the PaymentController to handle Stripe payments. The store method now checks if the payment method is Stripe and, if so, adds the Stripe token to the payment data before creating the payment.

  3. Updating the OrderController to pass the Stripe token to the PaymentController when processing payments for orders.

Summary

  • Implemented Stripe payment processing in the PaymentGatewayService class
  • Updated the PaymentController to handle Stripe payments
  • Updated the OrderController to pass the Stripe token when processing payments

@curtisdelicata curtisdelicata merged commit 8a395dc into main Aug 23, 2024
2 of 3 checks passed
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.

1 participant