Documentation
¶
Overview ¶
Package mastercard mocks the Mastercard Payment Gateway Services (MPGS) surface area. Real-world shape: result (SUCCESS | FAILURE | PENDING) + response.gatewayCode (APPROVED | DECLINED | INVALID_CSC | TIMED_OUT | BLOCKED | EXPIRED_CARD | ...) + order.id + transaction.id.
DTO shapes for Mastercard Payment Gateway Services (MPGS). Derived from the production reference library (test-dto-/mastercard.go). Kept scoped to the subset this mock actually emits on BuildResponse / BuildWebhookPayload — extend when a new failure mode needs additional surface area.
Reference types used (of the 551-line source):
- MasterCardPaymentResponse -> paymentResponse
- MasterCardOrderExtended -> orderResponse
- MasterCardResponseExtended -> responseBlock
- MasterCardCardSecurityCode -> cardSecurityCode
- MasterCardTransactionExtended-> transactionResponse
- MasterCardAcquirerExtended -> acquirerBlock
- MasterCardAuthorizationResponse -> authorizationResponse
- MasterCardError -> errorBlock
Status constants mirror MasterCardSuccessStatus / FailedStatus / PendingStatus / ErrorStatus / UnknownStatus.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct{}