Add support for Accept Hosted Payment Page and Customer Profiles from transactions.#43
Merged
jsacksick merged 4 commits intocommerceguys:masterfrom Oct 23, 2025
Merged
Conversation
…ion from transactions: - Introduced 'GetHostedPaymentPageRequest' to retrieve a token for launching the Accept Hosted payment form. - Added 'HostedPaymentSettings' and 'Setting' data types to manage hosted payment configuration settings. - Created 'CreateCustomerProfileFromTransactionRequest' to generate a customer profile, payment profile, and shipping address from an existing transaction. - Extended 'GetCustomerProfileRequest' with support for 'unmaskExpirationDate' flag. - Added comprehensive tests for: - 'HostedPaymentSettings' and 'Setting' functionality. - 'GetHostedPaymentPageRequest' with various configuration scenarios. - 'CreateCustomerProfileFromTransactionRequest' using both XML and JSON formats. - Minor update in 'CustomerProfileRequestTest' to explicitly set 'unmaskExpirationDate'. This commit enhances integration with Authorize.Net Accept Suite and customer profile APIs, enabling hosted form usage and simplifying profile management.
- Updated hardcoded 'startDate' in ARBCreateSubscriptionRequestTest to use a dynamic future date (1 day ahead) instead of a fixed date. - This resolves the API error: E00017: Start Date must not occur before the submission date.
- Introduced `AuthenticateTestRequest` class to support the `authenticateTestRequest` endpoint from Authorize.Net. - Allows verification of merchant API login and transaction key via the SDK. - Added `setMerchantAuthentication()` and `getMerchantAuthentication()` methods for credential injection. - Includes full test coverage with `AuthenticateTestRequestTest` for both XML and JSON request formats.
Introduces the removeSetting() method to allow removing a specific hosted payment configuration setting by name. Iterates through existing properties and unsets the matching entry based on 'settingName'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 PR introduces the following features to the SDK:
New API request classes:
GetHostedPaymentPageRequest: Retrieves a token to launch the Accept Hosted form.CreateCustomerProfileFromTransactionRequest: Creates a customer profile using a previous successful transaction.New data types:
HostedPaymentSettings: Represents a list of hosted payment configuration settings.Setting: A single key/value setting used withinHostedPaymentSettings.Enhancements:
GetCustomerProfileRequest: Adds support for theunmaskExpirationDateoption.Test coverage:
HostedPaymentSettings,GetHostedPaymentPageRequest, andCreateCustomerProfileFromTransactionRequestwith both XML and JSON response validation.These additions enable more robust integration with Authorize.Net's Accept Hosted and customer profile APIs.