This repository was archived by the owner on Jul 6, 2025. It is now read-only.
adding mobilepay capture (not tested) #93
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new feature to capture payments, including partial captures, and integrates it with the MobilePay service. The most important changes include the addition of a new request record, updates to the
PaymentControllerto handle capture requests, and modifications to thePaymentServiceandMobilePayServiceto process these captures.New Feature: Capture Payments
src/main/java/com/zenfulcode/commercify/commercify/api/requests/CapturePaymentRequest.java: Added a new record to handle capture payment requests withcaptureAmountandisPartialCapturefields.Controller Updates
src/main/java/com/zenfulcode/commercify/commercify/controller/PaymentController.java: Added a new endpoint to capture payments, which calls thecapturePaymentmethod inPaymentService. [1] [2]Service Updates
src/main/java/com/zenfulcode/commercify/commercify/service/PaymentService.java: Added a new methodcapturePaymentto handle the logic for capturing payments, including partial captures, and updating the payment status. [1] [2] [3]MobilePay Integration
src/main/java/com/zenfulcode/commercify/commercify/integration/mobilepay/MobilePayService.java: Added a new methodcapturePaymentto handle the capture request to the MobilePay API and update the payment status accordingly. [1] [2]