Download the PHP package cmpayments/orderapi-sdk-php without Composer

On this page you can find all versions of the php package cmpayments/orderapi-sdk-php. 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 orderapi-sdk-php

CMPayments Order API SDK for PHP

Build Status Software License Total Downloads

For more information about the Order API calls, see the documentation. This SDK is a toolbox, for more information about the inner workings of the Webdirect or One-Page-Checkout, see the integration manual at https://www.docdatapayments.com/developer/api/.

Installation

To install the SDK, simply use Composer:

Setting up a connection

Set up a connection by filling in the username and password. If you want to use the sandbox environment, add true as third parameter. All requests are created from this client.

Create request

This request will descripe a full request with a lot of optional fields.

First create a merchantOrderReference which refers to the your internal unique reference for this order and is used by the system for informational purposes in the Merchant BackOffice.

The PaymentPreference specifies the settings to use for all payments which are going to be made on this order. Replace <payment_profile> with your own payment profile.

Different visual styles are supported through CSS profiles. The id of this profile can be set like this:

The payment system requires shopper information for each order. The name element could also be provided with more information, like middlename, suffix, prefix etc.

Set billing and shipping information for the transaction. The shipping and billing address are the same in this example, even the receivers name is the same.

Here an invoice is created with 3 products. 1 Kingston microSD card and 2 pieces of the DVD 'Lonely Planet Thailand'

The final step is to send the CreateRequest to the API.

One Page Checkout

If you don't want to create different views for every payment method, there is a default checkout page that can be used. Note: The One Page Checkout is a feature that must be enabled in your account

startRequest

The start request is specific to the Webdirect scenario where a payment can be initiated without online interaction with the shopper. In this example we will start an iDEAL transaction. Note: The start request functionality is a feature that must be enabled in your account

List if iDEAL issuers in this API:

proceedRequest

The proceed request is specific to the Webdirect scenario where the shopper is redirected to an acquirer. It is used to finish the authorisation after the merchant returns from the acquirer. For example when the shopper is sent directly to iDEAL or 3D Secure.

captureRequest

The purpose of the capture request is to force the payment system to capture a payment order which is successfully authorized for processing by the acquirer. This operation however is not required in all scenarios. Depending on the payment method, the payment system offers an option to automatically capture payment orders after a predefined number of days. This option supports payment methods like AfterPay and Klarna Invoice where products are only to be shipped when the products are collected for shipment

statusRequest

The status request can be used to retrieve a report reflecting the actual status of an Order, its payments and its captures or refunds. The statusRequest is used to determine whether an Order is considered “paid”.

statusExtendedRequest

The extended status request can be used to retrieve additional information of an Order, its payments and its captures or refunds.

cancelRequest

The purpose of the cancel request is to force the payment system not to accept any payment actions for the given Order anymore. In a scenario where a shopper has cancelled the order in the web shop, the cancel request is to be used to synchronize the administration in both the web shop and the payment system to ensure no payments are processed by the payment system for the order.

refundRequest

In cases where a merchant wants to refund a certain amount on a Payment Order the refund request can be used. The refund request enables the refund process to be controlled and automated end-to-end between the web shop and the payment system.

@Todo implement the full refund option instead of the simple version.


All versions of orderapi-sdk-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
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 cmpayments/orderapi-sdk-php contains the following files

Loading the files please wait ....