Overview
  • Namespace
  • Class
  • Tree

Namespaces

  • OpenDNS
    • MES
      • Recurring
      • Reporting
      • Trident

Classes

  • Capture
  • CardTransaction
  • Credit
  • DeleteStoredCard
  • PreAuthorization
  • ReAuthorization
  • Refund
  • Request
  • Sale
  • StoreCard
  • Verification
  • Void

Class CardTransaction

Abstract for endpoints that accept a credit card and all its details

OpenDNS\MES\Request
Extended by OpenDNS\MES\Trident\Request
Extended by OpenDNS\MES\Trident\CardTransaction

Direct known subclasses

OpenDNS\MES\Trident\Credit, OpenDNS\MES\Trident\PreAuthorization, OpenDNS\MES\Trident\Sale, OpenDNS\MES\Trident\StoreCard, OpenDNS\MES\Trident\Verification

Abstract
Namespace: OpenDNS\MES\Trident
Located at Trident/CardTransaction.php

Methods summary

public OpenDNS\MES\Trident\CardTransaction
# setAmount( float|string $amount )

Sets the amount of the transaction

Sets the amount of the transaction

Parameters

$amount

Returns

OpenDNS\MES\Trident\CardTransaction
The current class instance for chaining
public OpenDNS\MES\Trident\CardTransaction
# setCardExpiration( integer|string|DateTime $month, integer|string|null $year = null )

Sets the credit card expiration date.

Sets the credit card expiration date.

Accepts strings because that's most commonly how they're implemented in web forms. You can also pass a \DateTime instance as a single argument

Parameters

$month
Either the expiration month or a datetime representing the whole expiration date
$year
Expiration year (2 or 4 digits) or omit if using a \DateTime

Returns

OpenDNS\MES\Trident\CardTransaction
The current class instance for chaining
public OpenDNS\MES\Trident\CardTransaction
# setCardId( string $cardId )

Sets a card ID from a previous 'Store Card' operation to charge.

Sets a card ID from a previous 'Store Card' operation to charge.

This is mutually exclusive of setting the card number. Setting a Card ID will unset any previously set card number.

Parameters

$cardId
32-character card ID

Returns

OpenDNS\MES\Trident\CardTransaction
The current class instance for chaining
public OpenDNS\MES\Trident\CardTransaction
# setCardNumber( string $cardNumber )

Sets the credit card number to charge.

Sets the credit card number to charge.

This is mutually exclusive of setting the card id. Setting a card number will unset any previously set card id.

Parameters

$cardNumber
15 or 16 digit credit card number

Returns

OpenDNS\MES\Trident\CardTransaction
The current class instance for chaining
public OpenDNS\MES\Trident\CardTransaction
# setClientReferenceNumber( integer|string $referenceNumber )

Sets a reference number that's of significance to the client.

Sets a reference number that's of significance to the client.

This might be an order number or some other value that you the merchant would like to be able to refer to. It can't contain '&' or '=' for some reason

Parameters

$referenceNumber
A number of some interest to you.

Returns

OpenDNS\MES\Trident\CardTransaction
The current class instance for chaining
public OpenDNS\MES\Trident\CardTransaction
# setCvv2( integer|string $cvv2 )

Sets the card's CVV2 value for extra verification.

Sets the card's CVV2 value for extra verification.

Requires that CVV2 support be enabled on your account by MeS.

Parameters

$cvv2
A 3 or 4 digit card verification number

Returns

OpenDNS\MES\Trident\CardTransaction
The current class instance for chaining
public OpenDNS\MES\Trident\CardTransaction
# setInvoiceNumber( integer|string $invoiceNumber )

Sets the invoice number for the transaction.

Sets the invoice number for the transaction.

Limited to 0-9, a-z, A-Z, and spaces.

Parameters

$invoiceNumber

Returns

OpenDNS\MES\Trident\CardTransaction
The current class instance for chaining
public OpenDNS\MES\Trident\CardTransaction
# setStreetAddress( string $streetAddress )

Sets the cardholder's street address for verification

Sets the cardholder's street address for verification

Just the first line ('123 Fake Street', for example)

Parameters

$streetAddress

Returns

OpenDNS\MES\Trident\CardTransaction
The current class instance for chaining
public OpenDNS\MES\Trident\CardTransaction
# setZipCode( integer $zipCode )

Sets the cardholder's ZIP code (or postal code) for verification

Sets the cardholder's ZIP code (or postal code) for verification

Can be either 5 or 9 digits long.

Parameters

$zipCode
$streetAddress

Returns

OpenDNS\MES\Trident\CardTransaction
The current class instance for chaining

Methods inherited from OpenDNS\MES\Trident\Request

__construct(), setAuthenticationInfo()

Methods inherited from OpenDNS\MES\Request

execute(), factory(), getApiUrl(), getClient(), processResponse(), removeField(), setDefaults(), setField()

Magic methods summary

Constants summary

Constants inherited from OpenDNS\MES\Request

ENV_CERT, ENV_PROD, ENV_TEST

Properties summary

Properties inherited from OpenDNS\MES\Trident\Request

$apiBasePath, $transactionType

Properties inherited from OpenDNS\MES\Request

$apiBaseDomain, $apiEndpointPath, $apiEnvironment, $defaultFieldValues, $httpMethod

API documentation generated by ApiGen