Conversation
9bfb980 to
e76a8e5
Compare
There was a problem hiding this comment.
Pull Request Overview
Adds PASSKEY and 3DS authentication support to Charge model and request builder, updates fixtures/tests to assert new request/response fields, and refactors Example class output from System.out to java.util.logging while adding an authentication-aware charge example.
- Introduces AuthenticationType enum and new Charge fields: authentication, authenticated_by.
- Extends Charge.CreateRequestBuilder to allow setting authentication and updates related tests/fixtures.
- Refactors Example to use logging and adds chargeWithAuthentication method plus accompanying ExampleTest for coverage.
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/co/omise/models/AuthenticationType.java | New enum for authentication modes (3DS, PASSKEY). |
| src/main/java/co/omise/models/Charge.java | Adds authentication fields and builder support. |
| src/main/java/co/omise/Example.java | Logging refactor and new chargeWithAuthentication workflow. |
| src/test/java/co/omise/requests/ChargeRequestTest.java | Adds assertions for authentication fields and request payload updates. |
| src/test/java/co/omise/ExampleTest.java | New test exercising Example methods including authentication use. |
| testdata fixture JSON files | Updated/added fixtures including authentication and authenticated_by fields (PASSKEY, 3DS, null cases). |
| charge_object.json | Adds authentication fields to base charge test object. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| logInfo( | ||
| "created charge with %s authentication: %s and auth url: %s ", | ||
| authenticationType.name(), | ||
| charge.getId(), | ||
| charge.getAuthorizeUri()); |
There was a problem hiding this comment.
[nitpick] authenticationType.name() logs 'THREE_DS' instead of the serialized value '3DS', which can confuse users. Consider adding a helper (e.g., a method or map) to log the wire-format value consistent with @JsonProperty annotations (e.g., map THREE_DS -> '3DS', PASSKEY -> 'PASSKEY').
|



Description
authenticationin charge request (enum:PASSKEY,3DS) for TAS PASSKEY supportauthenticated_byinchargeresponseNOTE:
Business impact (if any)