Skip to content

Conversation

Copy link

Copilot AI commented Oct 5, 2025

Summary

This PR significantly improves the README documentation and adds comprehensive documentation for the Redsys InSite (EMV 3DS) payment method, which was previously undocumented despite being implemented in the codebase.

Changes

Documentation Structure

  • Added a Table of Contents for easy navigation
  • Reorganized content into logical sections with clear hierarchy
  • Improved the package description for better clarity

Configuration Section

Added a dedicated configuration section documenting both environments:

  • Sandbox Environment - For testing with example credentials
  • Production Environment - For live payment processing

Enhanced Redirect Payment Documentation

  • Reorganized under a proper "Payment Methods" section
  • Added detailed documentation for all optional parameters:
    • description() - Product/order description
    • merchantName() - Custom merchant name
    • data() - Internal reference data
    • merchantPaymethods() - Payment method filters (e.g., Bizum)
    • urlSuccessful() / urlDenied() - Custom redirect URLs
  • Improved code examples with clearer comments and better formatting

InSite Payment Documentation (New) 🎉

Added complete documentation for the EMV 3DS payment flow:

Step 1: Card Configuration

$config = $redsys->inSite()->cardConfiguration($orderId, $amount, $cardToken, $urlNotification);
  • Explains how to initialize 3DS authentication
  • Documents the configuration response structure
  • Includes iframe integration for 3DS method data collection

Step 2: Process Payment

$response = $redsys->inSite()->process($orderId, $amount, $cardToken, $urlNotification, $screen, $em3dSecure, $request);
  • Documents browser screen data collection requirements
  • Explains EMV 3DS authentication data handling
  • Shows how to detect when a 3DS challenge is required

Step 3: Capture Payment

$response = $redsys->inSite()->capture($orderId, $amount, $cardToken, $version, $cres);
  • Documents challenge completion flow
  • Explains cres parameter handling from iframe submission

Response Object Documentation (New)

Added a dedicated section explaining the Response object:

  • Properties: orderId, amount, authorizationCode, errorCode, responseCode, data, emv3ds
  • Methods: successful(), required3DsChallenger(), secure(), toArray()
  • Includes practical example showing response handling for both success and failure cases

Testing Section

Enhanced with commands for:

  • Running tests: composer test
  • Static analysis: composer analyse
  • Code style fixes: composer style

Impact

  • 265 lines added, 17 lines removed (4x increase in documentation size)
  • Complete coverage of both payment methods (Redirect and InSite)
  • Developers can now implement InSite payments without needing to read the source code
  • Better onboarding experience for new users of the package

Closes #[issue_number]

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/php-http/discovery/zipball/82fe4c73ef3363caed49ff8dd1539ba06044910d
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/62OpOd /usr/bin/composer install (http block)
  • https://api.github.com/repos/symfony/polyfill-php84/zipball/d8ced4d875142b6a7426000426b8abc631d6b191
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/62OpOd /usr/bin/composer install (http block)
  • https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/62OpOd /usr/bin/composer install (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Improve documentation</issue_title>
<issue_description>- Update and refine documentation

  • Add Redsys inSite</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #17

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Improve documentation Improve documentation and add Redsys InSite payment method documentation Oct 5, 2025
Copilot AI requested a review from cesargb October 5, 2025 13:37
Copilot finished work on behalf of cesargb October 5, 2025 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve documentation

2 participants