Skip to content

Repository files navigation

Payment Integration Project Documentation

Overview

The Payment Integration Project provides a unified interface for processing payment transactions through different payment providers (e.g., aci, shift4). This document outlines the key endpoint, request parameters, and response structure.


Installation

docker-compose up
composer install

Payment CLI sandbox

php bin/console app:create-test-payment-transaction {aci|shift4}

Integration tests

php ./vendor/bin/phpunit

API Endpoint

Payment Transactions Endpoint

{
"route": "/api/payment-transactions/{integration<aci|shift4>}",
"method": "POST"
}

Description: Handles payment transactions for the specified integration (aci or shift4).


Request Parameters

Example Request Payload

{
"moneyAmount": {
"amount": 50.00,
"currencyCode": "EUR"
},
"debitCard": {
"number": "4263982640269299",
"expMonth": "02",
"expYear": "2026",
"cvv": "837"
}
}

Field Descriptions

  • moneyAmount: Contains the amount and currency for the transaction.
    • amount: The monetary value of the transaction (e.g., 50.00).
    • currencyCode: ISO 4217 currency code (e.g., EUR).
  • debitCard: Contains the debit card details for the transaction.
    • number: The 16-digit debit card number.
    • expMonth: The card’s expiration month (e.g., 02 for February).
    • expYear: The card’s expiration year (e.g., 2026).
    • cvv: The card’s 3-digit CVV security code.

Response

Example Succes Response Payload

{
"transactionId": "1234567890",
"dateOfCreating": "2025-01-12T10:15:30Z",
"moneyAmount": {
"amount": 50.00,
"currencyCode": "EUR"
},
"cardBin": "426398"
}

Fields Description

  • transactionId: A unique identifier for the transaction.
  • dateOfCreating: The date and time the transaction was created.
  • moneyAmount: The monetary value and currency of the transaction.
    • amount: The monetary value as a float.
    • currencyCode: The currency code as per ISO 4217.
  • cardBin: The Bank Identification Number (BIN) of the card used for the transaction.

Example Error Response Payload

{
"status": "error",
"message": "invalid cc number/brand combination",
"code": 0
}

Notes

Copule of tweeks left such as logs, error codes and some integration schema modeling

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages