Overview

Packages

  • exceptions
  • messages
  • operations
  • PHP
  • service
  • types

Classes

  • PartnerAPIService
  • Overview
  • Package
  • Class
  • Tree

Class PartnerAPIService

This class represents a Partner API WebService.

When constructing an object of this type you have to pass proper user name and password as arguments. Optionally, you may specify a URL for a WSDL file of a web service as the third argument. The fourth argument can be used to specify a language used for some localized texts.

Package: service
Copyright: Copyright (c) 2020 Asseco Data Systems SA
License: license.txt
Located at certumPartnerAPI/service.php
Methods summary
public
# __construct( string $userName = '', string $password = '', string|null $wsdl = NULL, string $lang = 'en' )

The constructor.

The constructor.

The $userName and $password arguments are required. They are used as credentials data in the Partner API WebService. So, creating an object of this class you have to pass your user name and password for the service. The third argument $wsdl is optional and if it is NULL the object connects to the testing web service using the URL defined in the WSDL_TEST field. The fourth argument $lang is also optional. If given it must match one of language codes in the LANGS constant field. Otherwise 'en' is used.

Parameters

$userName
string
$userName
$password
string
$password
$wsdl
string|null
$wsdl Default: NULL
$lang
string
$lang Default: en
public string
# getUserName( )

Returns the user name

Returns the user name

Returns

string
public PartnerAPIService
# setUserName( string $userName )

Sets the user name to be used for authentication in a web service.

Sets the user name to be used for authentication in a web service.

Parameters

$userName
string
$userName

Returns

PartnerAPIService
The object being called
public string
# getPassword( )

Returns the password

Returns the password

Returns

string
public PartnerAPIService
# setPassword( string $password )

Sets the password to be used for authentication in a web service.

Sets the password to be used for authentication in a web service.

Parameters

$password
string
$password

Returns

PartnerAPIService
The object being called
public string
# getLang( )

Returns current language

Returns current language

Returns

string
public PartnerAPIService
# setLang( string $lang )

Sets the current language

Sets the current language

Parameters

$lang
string
$lang

Returns

PartnerAPIService
The object being called
public string
# getWSDL( )

Returns current URL for a WSDL file.

Returns current URL for a WSDL file.

Returns

string
public PartnerAPIService
# setWSDL( string|null $wsdl )

Sets the current URL for a WSDL file.

Sets the current URL for a WSDL file.

Parameters

$wsdl
string|null
$wsdl

Returns

PartnerAPIService
The object being called
public PartnerAPIService
# setCatchSoapFault( boolean $yes_or_no )

Configures the service to pass or to catch SoapFault exceptions.

Configures the service to pass or to catch SoapFault exceptions.

If SoapFault exceptions are catched they are rethrown as PartnerAPIException.

Parameters

$yes_or_no
boolean
$yes_or_no

Returns

PartnerAPIService
public boolean
# getCatchSoapFault( )

Tells if SoapFault exceptions are passed or catched.

Tells if SoapFault exceptions are passed or catched.

Returns

boolean
True if SoapFault exceptions are catched, False otherwise
public PartnerAPIService
# setDebugFile( string|null $fname = NULL )

Sets a file for storing debug information.

Sets a file for storing debug information.

The argument $fname should be null or a string containing a file name. If it is null, no debug information will be stored anywhere. Otherwise, it must be anything acceptable by the PHP function fopen() as the first argument.

Parameters

$fname
string|null
$fname

Returns

PartnerAPIService

Throws

PartnerAPIException
public string|null
# getDebugFile( )

Return a file name for writing debug information.

Return a file name for writing debug information.

It can also return null if no file name has been set.

Returns

string|null
A file name
public PartnerAPIOperationValidateOrderParameters
# operationValidateOrderParameters( )

Returns an object representing the validateOrderParameters operation.

Returns an object representing the validateOrderParameters operation.

Returns

PartnerAPIOperationValidateOrderParameters
public PartnerAPIOperationQuickOrder
# operationQuickOrder( )

Returns an object representing the quickOrder operation.

Returns an object representing the quickOrder operation.

Returns

PartnerAPIOperationQuickOrder
public PartnerAPIOperationGetOrderByOrderID
# operationGetOrderByOrderID( )

Returns an object representing the getOrderByOrderID operation.

Returns an object representing the getOrderByOrderID operation.

Returns

PartnerAPIOperationGetOrderByOrderID
public PartnerAPIOperationGetOrderByOrderID
# operationGetOrdersByDateRange( )

Returns an object representing the getOrderByOrderID operation.

Returns an object representing the getOrderByOrderID operation.

Returns

PartnerAPIOperationGetOrderByOrderID
public PartnerAPIOperationGetModifiedOrders
# operationGetModifiedOrders( )

Returns an object representing the getModifiedOrders operation.

Returns an object representing the getModifiedOrders operation.

Returns

PartnerAPIOperationGetModifiedOrders
public PartnerAPIOperationCancelOrder
# operationCancelOrder( )

Returns an object representing the cancelOrder operation.

Returns an object representing the cancelOrder operation.

Returns

PartnerAPIOperationCancelOrder
public PartnerAPIOperationGetProductList
# operationGetProductList( )

Returns an object representing the getProductList operation.

Returns an object representing the getProductList operation.

Returns

PartnerAPIOperationGetProductList
public PartnerAPIOperationGetConfiguration
# operationGetConfiguration( )

Returns an object representing the getConfiguration operation.

Returns an object representing the getConfiguration operation.

Returns

PartnerAPIOperationGetConfiguration
public PartnerAPIOperationGetCertificate
# operationGetCertificate( )

Returns an object representing the getCertificate operation.

Returns an object representing the getCertificate operation.

Returns

PartnerAPIOperationGetCertificate
public PartnerAPIOperationRenewCertificate
# operationRenewCertificate( )

Returns an object representing the renewCertificate operation.

Returns an object representing the renewCertificate operation.

Returns

PartnerAPIOperationRenewCertificate
public PartnerAPIOperationRevokeCertificate
# operationRevokeCertificate( )

Returns an object representing the revokeCertificate operation.

Returns an object representing the revokeCertificate operation.

Returns

PartnerAPIOperationRevokeCertificate
public PartnerAPIOperationGetExpiringCertificates
# operationGetExpiringCertificates( )

Returns an object representing the getExpiringCertificates operation.

Returns an object representing the getExpiringCertificates operation.

Returns

PartnerAPIOperationGetExpiringCertificates
public PartnerAPIOperationVerifyOrder
# operationVerifyOrder( )

Returns an object representing the verifyOrder operation.

Returns an object representing the verifyOrder operation.

Returns

PartnerAPIOperationVerifyOrder
public PartnerAPIOperationOrderSNICertificate
# operationOrderSNICertificate( )

Returns an object representing the orderSNICertificate operation.

Returns an object representing the orderSNICertificate operation.

Returns

PartnerAPIOperationOrderSNICertificate
public PartnerAPIOperationModifySNICertificate
# operationModifySNICertificate( )

Returns an object representing the modifySNICertificate operation.

Returns an object representing the modifySNICertificate operation.

Returns

PartnerAPIOperationModifySNICertificate
public PartnerAPIOperationGetEmailVerification
# operationGetEmailVerification( )

Returns an object representing the getEmailVerification operation.

Returns an object representing the getEmailVerification operation.

Returns

PartnerAPIOperationGetEmailVerification
public PartnerAPIOperationReissueCertificate
# operationReissueCertificate( )

Returns an object representing the reissueCertificate operation.

Returns an object representing the reissueCertificate operation.

Returns

PartnerAPIOperationReissueCertificate
public PartnerAPIOperationGetOrderState
# operationGetOrderState( )

Returns an object representing the getOrderState operation.

Returns an object representing the getOrderState operation.

Returns

PartnerAPIOperationGetOrderState
public PartnerAPIOperationGetSanVerificationState
# operationGetSanVerificationState( )

Returns an object representing the getSanVerificationState operation.

Returns an object representing the getSanVerificationState operation.

Returns

PartnerAPIOperationGetSanVerificationState
public PartnerAPIOperationPerformSanVerification
# operationPerformSanVerification( )

Returns an object representing the performSanVerification operation.

Returns an object representing the performSanVerification operation.

Returns

PartnerAPIOperationPerformSanVerification
public PartnerAPIOperationAddSanVerification
# operationAddSanVerification( )

Returns an object representing the addSanVerification operation.

Returns an object representing the addSanVerification operation.

Returns

PartnerAPIOperationAddSanVerification
public PartnerAPIOperationAddEmailVerification
# operationAddEmailVerification( )

Returns an object representing the addEmailVerification operation.

Returns an object representing the addEmailVerification operation.

Returns

PartnerAPIOperationAddEmailVerification
public object
# call( string $operation = 'unspecified', array $data = array() )

This method invokes a given operation in the Partner API WebService

This method invokes a given operation in the Partner API WebService

This method is used for communication with the service. It sends the data passed in the $data argument to the service and invokes the operation specified in the $operation argument. It uses a WSDL file defined as the current WSDL file in the constructor or by calling the setWSDL() method. The $operation argument is simply a string. The $data argument is an array in which keys are parts' names (according to WSDL) and values are subsequent arrays. The subsequent arrays contain all passed elements. A subsequent array's key is an element's name and value is a scalar value, an array of scalar values or an array of further elements.

This method can write debugging information to a file (see the setDebugFile() method). This information is stored in a file only after a successful call to a service.

Although it is possible, it is not intended this method to be called directly by a user. It is invoked by operation objects.

It returns an object containg all returned data from the service.

Parameters

$operation
string
$operation The operations to be called
$data
array
$data The data to be passed to the operation

Returns

object

Throws

SoapFault
PartnerAPIException
protected
# writeDebugData( string $operation, array $data, array|string|object $r, SoapClient $client )

Writes debugging information to a file.

Writes debugging information to a file.

Parameters

$operation
string
$operation Operation invoked
$data
array
$data Data sent
$r
array|string|object
$r Response data
$client
SoapClient
$client Client object
Constants summary
string WSDL_TEST 'https://gs.test.certum.pl/service/PartnerApi.wsdl'
#

A constant field containing URL to a WSDL file in a testing web service

A constant field containing URL to a WSDL file in a testing web service

string WSDL_PROD 'https://gs.certum.pl/service/PartnerApi.wsdl'
#

A constant field containing URL to a WSDL file in a production web service

A constant field containing URL to a WSDL file in a production web service

string LANGS 'en;pl'
#

List of available languages used for some localized messages.

List of available languages used for some localized messages.

It is a list of two-letter language codes joined with a semicolon. Currently only two languages are supported: English and Polish.

API documentation generated by ApiGen 2.8.0