Download the PHP package abeta-io/abeta-punchout without Composer

On this page you can find all versions of the php package abeta-io/abeta-punchout. 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 abeta-punchout

Abeta for Laravel

The official Laravel Punchout plugin for Abeta. Offer OCI and cXML PunchOut quickly and easily with Abeta. Connect with procurement systems / ERPs such as Coupa, Oracle and Sap Ariba. Increase the turnover of existing customers or acquire new customers with the help of B2B connections.

Requirements

To properly use this plugin a registered Abeta account is needed!

Installation

Install via composer:

Publish the config file

Publish the routes file

Quick start

Return cart Facade

Use the global helper to check if a user is a PunchOut user

Order Confirmation Integration

The package provides two approaches for handling order confirmation: event listeners or callback functions. This flexibility simplifies the integration of the order processing flow into various systems.

Option 1: Using Event Listeners

It is possible to listen to the OrderReceived event to handle order confirmation data. The event provides access to a structured Order DTO, making it easy to retrieve order details.

Example Listener:

Registering the Listener By default, Laravel will automatically find and register your event listeners by scanning your application's Listeners directory. However, if event discovery is disabled in your project, you will need to register the listener manually in the EventServiceProvider. To do so, follow these steps:

Option 2: Using the Callback Function

Alternatively, the onOrderProcessed callback function can be used to handle order data. This approach is useful for inline or quick customizations.

Example Callback inside AppServiceProvider:

Error Handling

The plugin uses a custom exception, OrderProcessingException, to handle errors during order processing. This exception ensures that errors are properly caught and returned as structured messages by the controller.

The plugin validates incoming data in the controller and returns error messages in the response when validation fails. However, you can also implement custom error handling logic in your event listener or callback function.

Order DTO Structure

The Order DTO provides an object-oriented structure for accessing order data: Property Description
cart_id Unique identifier for the cart
total Total order amount
currency Order currency (e.g., EUR)
delivery_datetime Delivery date and time
order_reference Reference number for the order
customer_reference Reference number for the customer
products Collection of Product objects
billTo Billing address (Address object)
shippTo Shipping address (Address object)

Converting Order to Array

To convert the Order DTO to an array for further processing:

Configuration

Customizing Routes

The package provides predefined routes for handling login operations. If you prefer to customize these routes, you can configure the following options in config/abeta.php:

Using other model than User model

Want to use another model than Laravels default User model?



<?php

/*
* Configuration of the Abeta Punchout Package, used to offer OCI and cXML via the Abeta Middleware.
*/

return [

    /*
    * Customer model, used to select customer from.
    */
    'customerModel' => '\App\Models\User',

    /*
    * Auth provider
    */
    'auth' => '\Illuminate\Support\Facades\Auth',

    /*
    * String, representing database column of username
    */
    'username' => 'email',

    /*
    * String, representing database column of password
    */
    'password' => 'password',

];

All versions of abeta-punchout with dependencies

PHP Build Version
Package Version
Requires php Version ~7.0|~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 abeta-io/abeta-punchout contains the following files

Loading the files please wait ...