Download the PHP package tapbuy/checkout-graphql without Composer

On this page you can find all versions of the php package tapbuy/checkout-graphql. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package checkout-graphql

Tapbuy CheckoutGraphql Module

A Magento 2 GraphQL extension that provides enhanced checkout functionality with token-based authorization for secure access to customer, order, and payment data.

Overview

The Tapbuy CheckoutGraphql module extends Magento 2's native GraphQL API with additional resolvers and functionality specifically designed for checkout processes. It includes robust token-based authorization to ensure secure access to sensitive data.

Features

GraphQL Queries

GraphQL Mutations

GraphQL Types

Security

Installation

  1. Copy the module to your Magento installation:

  2. Enable the module:

  3. Run setup upgrade:

  4. Compile DI:

  5. Clear cache:

Configuration

Token Authorization Setup

  1. Create Integration: Go to System → Extensions → Integrations in Magento Admin
  2. Configure Permissions: Assign appropriate permissions:
    • Magento_Customer::customer - For customer operations
    • Magento_Sales::actions_view - For order operations
  3. Generate Tokens: Activate the integration to generate access tokens

Required Permissions

The module requires the following ACL resources:

Usage

Authentication

All GraphQL queries require a Bearer token in the Authorization header:

GraphQL Queries

Search Customer by Email

Get Order by Number

Takes order_number or order_id

GraphQL Mutations

Assign Guest Order to Customer

order_id accepts either the order entity ID or its increment ID. Use order_identifier_type (auto, entity_id, or increment_id) to disambiguate when necessary. The order email must match the customer's email address before assignment.

Unlock Cart

Supply either a masked or numeric cart ID; unlock_reason is optional and impacts the resulting order status.

Deactivate Cart

Payment Method Integration

The module includes a plugin for SetPaymentMethodOnCart that handles additional Tapbuy payment information:

Architecture

Authorization Flow

  1. Token Extraction: Extract Bearer token from Authorization header
  2. Token Validation: Validate token against Magento's OAuth system
  3. Integration Check: Verify integration status and permissions
  4. Resource Authorization: Check specific ACL resource permissions
  5. Data Access: Allow or deny access based on authorization results

File Structure

Error Handling

The module provides comprehensive error handling:

Security Considerations

Development

Adding New Resolvers

  1. Create resolver class in Model/Resolver/
  2. Implement ResolverInterface
  3. Add authorization check using TokenAuthorization
  4. Register in etc/di.xml
  5. Define schema in etc/schema.graphqls

Extending Authorization

The TokenAuthorization class can be extended to support additional authorization mechanisms or custom permission logic.

Troubleshooting

Common Issues

  1. "Token is required" Error

    • Ensure Authorization header is present
    • Verify Bearer token format
  2. "Invalid token" Error

    • Check token validity in Magento Admin
    • Regenerate integration tokens if needed
  3. "You do not have permission" Error

    • Verify integration permissions
    • Check ACL resource assignments
  4. "Order not found" Error
    • Verify order number exists

Development

Running Tests

Tests run inside a Docker container that replicates the CI environment (PHP 8.3, Magento 2.4.7-p5). Docker must be running.

Prerequisites: clone the following sibling repository next to this one:

First-time setup:

Run all unit tests:

On the first run, the Docker image is built and Magento is installed into a named volume (tapbuy-magento-2.4.7-p5-php83). Subsequent runs reuse the cached volume and are fast.

Do not use composer test — it runs PHPUnit without the Magento bootstrap and will fail or produce misleading results.

Linting

Linting runs PHPMD and PHPCS (Magento2 standard) inside the same Docker container as tests. Docker must be running.

Run both linters:

Run individually:

Both linters always run when using make lint; if either fails, the command exits with a non-zero code.


All versions of checkout-graphql with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.1
magento/framework Version ^103.0
magento/module-graph-ql Version ^100.4
magento/module-quote Version ^101.2
magento/module-quote-graph-ql Version ^100.4
magento/module-sales Version ^103.0
magento/module-sales-graph-ql Version ^100.4
magento/module-customer Version ^103.0
tapbuy/redirect-tracking Version ^1.8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tapbuy/checkout-graphql contains the following files

Loading the files please wait ...