Skip to content

Conversation

@SalmanTwo
Copy link
Contributor

Enable invoice upload and minor improvements

@SalmanTwo SalmanTwo requested a review from brtkwr January 22, 2026 16:49
@gemini-code-assist
Copy link

Summary of Changes

Hello @SalmanTwo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the Two Payment module for PrestaShop by re-enabling and refining the invoice upload functionality, ensuring seamless integration with the Two platform. It also introduces critical improvements to tax and shipping calculation accuracy, addressing previous API validation issues. Furthermore, the company verification process has been made more robust by leveraging organization numbers from customer addresses. A new admin information tab improves merchant usability, and the addition of AI-focused documentation files ('CLAUDE.md', '.ai/*.md') streamlines future development and maintenance.

Highlights

  • Invoice Upload Re-enabled: The feature to upload PrestaShop-generated PDF invoices to the Two platform upon order fulfillment has been re-enabled. Merchants are now provided with clear instructions and code examples for customizing their invoice templates to include Two's payment details.
  • Enhanced Tax & Shipping Calculations: Significant improvements have been made to how tax rates and shipping costs are calculated, ensuring strict compliance with the Two API's formula ('tax_amount = net_amount * tax_rate'). This includes using native PrestaShop tax fields as the primary source and robust handling of free shipping rules.
  • Improved Company Verification: The module now intelligently extracts and verifies company organization numbers (like DNI, VAT number) from customer address fields using the Two API, providing more reliable company data for order intent checks and reducing manual search requirements for logged-in users.
  • New Plugin Information Tab: A dedicated 'Plugin Information' tab has been added to the module's admin configuration, offering a clear overview of the plugin's capabilities, limitations, important requirements, and troubleshooting tips.
  • AI-Assisted Development Documentation: New '.ai/decisions.md', '.ai/learnings.md', and 'CLAUDE.md' files have been introduced to document architectural decisions, bug fixes, and provide comprehensive context and critical rules for AI agents and developers, fostering self-improvement and consistency.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request introduces new documentation files for AI context and architectural decisions, updates the changelog, and re-enables the invoice upload feature with detailed configuration instructions. It also includes significant improvements to company data resolution during checkout, enhancing the reliability of order intent checks by verifying organization numbers from address fields via the Two API. Tax and shipping calculation logic has been refined for better accuracy and compliance with the Two API, and a new 'Plugin Information' tab has been added to the admin panel for better user guidance. The module version has been updated to 2.3.2.


## Quick Rules (see CLAUDE.md for full details)

1. **Read CLAUDE.md first** - Contains all development patterns and rules

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This rule is redundant as the introductory sentence on line 6 already states that CLAUDE.md is the primary source for detailed rules. Removing it will make the 'Quick Rules' section more concise.

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.

2 participants