Judopay Documentation

Server SDK - PHP

For examples on Integrating PHP with the Server SDK, see our sample app for more information.

Prerequisites

  • PHP 5.5 and above

  • Composer Package Manager

Integration

Using the Composer Package Manager:

  1. Add the Judopay package to your composer.json file:

"require": {    
    "judopay/judopay-sdk": "4.4.0"
}
  1. Execute: $ composer install

  1. Make the Judopay SDK classes available to your application, by adding the following to your file: require 'vendor/autoload.php';

Setup

  1. Create a new Judopay object, with your API credentials:

    Note

    For the purpose of this exercise, the sandbox token and secret have been added.

    $judopay = new \Judopay(
        array(
            'apiToken' => 'your-token',
            'apiSecret' => 'your-secret',
            'judoId' => 'your-judo-id',
            //Set to true on production, defaults to false which is the sandbox
            'useProduction' => false
        )
    );
  2. Ensure the SDK is configured for the environment you are targeting.

    For example, if you are using the sandbox environment: 'useProduction' => false

The Server SDK allows for further configuration:

  • Logging. To help debug you can attach a logger library. We recommend Monolog, however any PSR-3 standard library is compatible.

Note

Validation error details can be found in the modelErrors array. For example if a required field is missing from the model.

Check Card

Note

When making a token payment, you can obtain the card token from the Check Card response.

  1. Prepare the check card request:

    $checkCard = $judopay->getModel('CheckCard');    $attributes = [
        'cardNumber' => '4976000000003436',
        'expiryDate' => '12/25',
        'cv2' => '452',
        'judoId' => '100915867',
        'yourConsumerReference' => 'consumerRef',
        'yourPaymentReference' => 'paymentRef' 
    ];    $checkCard->setAttributeValues($attributes);

CheckCard Model Parameters:

Parameter

Description

yourConsumerReference

String

Required

Unique reference to anonymously identify your customer.

Advisable to use GUIDs.

Must be below 40 characters.

yourPaymentReference

String

Required

Set your unique reference for this payment. 

Format:

  • Maximum length 50 characters.

This value should be unique in order to protect your customers against duplicate transactions. 

With a server side integration, if a payment reference is not supplied, the transaction will not be processed.

cardNumber

String

Required

Submitted without whitespace or non-numeric characters.

expiryDate

String

Required

The expiry date of the card.

Format: 

  • MM/YY

cv2

String

Required

The 3 or 4 digit number on the back of a credit card.

Also known as the card verification value (CVV) or security code.

judoId

String

Required

Unique ID supplied by Judopay.

Specific to a merchant and/or location.

Format:

  • 100100100

  • Maximum length 9 characters.

  • Do not include spaces or dashes.

currency

String

Optional

The currency of the transaction. 

Any ISO 4217 alphabetic currency code:

  • GBP

  • USD

  • EUR

yourPaymentMetaData

String

Optional

Additional information associated with a transaction to help reconcile.

  1. Send the request:

try {
    $response = $checkCard->create();
    // Handle successful payment    
     $cardToken = $response['cardDetails']['cardToken'];
     } catch (\Exception $e) {
    // Handle the errors
    return;
}
  1. Get the card token from the response:

$cardToken = $response['cardDetails']['cardToken'];

Build the token payment using the card token from the response.

Note

If you see the following error message: "Sorry, we're currently unable to route this transaction. Please check your account details and try again" Your Judopay account is not configured for the check card operation. Contact Customer Support.

Register Card

Note

When making a token payment, you can obtain the card token from the Register Card response.

  1. Prepare the register card request:

    $registerCard = $judopay->getModel('RegisterCard');    
     $attributes = [
        'cardNumber' => '4976000000003436',
        'expiryDate' => '12/25',
        'cv2' => '452',
        'judoId' => '100915867',
        'yourConsumerReference' => 'consumerRef',
        'yourPaymentReference' => 'paymentRef'
    ];    $registerCard->setAttributeValues($attributes);

RegisterCard Model Parameters:

Parameter

Description

yourConsumerReference

String

Required

Unique reference to anonymously identify your customer.

Advisable to use GUIDs.

Must be below 40 characters.

yourPaymentReference

String

Required

Set your unique reference for this payment. 

Format:

  • Maximum length 50 characters.

This value should be unique in order to protect your customers against duplicate transactions. 

With a server side integration, if a payment reference is not supplied, the transaction will not be processed.

cardNumber

String

Required

Submitted without whitespace or non-numeric characters.

expiryDate

String

Required

The expiry date of the card.

Format: 

  • MM/YY

cv2

String

Required

The 3 or 4 digit number on the back of a credit card.

Also known as the card verification value (CVV) or security code.

amount

Float

Optional

The amount to process. 

Format:

  • Two decimal places

For currencies using a different structure please contact Judopay for support.

currency

String

Optional

The currency of the transaction. 

Any ISO 4217 alphabetic currency code:

  • GBP

  • USD

  • EUR

judoId

String

Required

Unique ID supplied by Judopay.

Specific to a merchant and/or location.

Format:

  • 100100100

  • Maximum length 9 characters.

  • Do not include spaces or dashes.

  1. Send the request to Judopay:

    try {
        $response = $registerCard->create();
             // Handle successful payment        
             $cardToken = $response['cardDetails']['cardToken'];    
                 } catch (\Exception $e) {
                 // Handle the errors
               return;
    }
  1. Get the card token from the response:

$cardToken = $response['cardDetails']['cardToken'];

Build the token payment using the card token from the response.

Token Payments

Note

You can create a token payment following a: Payment | PreAuth | Register Card | Check Card operation, as a card token is always returned.

  1. Prepare the token payment:

$tokenPayment = $judopay->getModel('TokenPayment');   
 $tokenPaymentAttributes = [
        'amount' => 1.10,
        'cardToken' => $cardToken,
        'expiryDate' => '12/25',
        'yourConsumerReference' =>  'consumerRef',
        'yourPaymentReference' => 'paymentRef',
        'cv2' => '452',
        'currency' => 'GBP',
        'judoId' => '100915867'
    ];    $tokenPayment->setAttributeValues($tokenPaymentAttributes);

TokenPayment Model Parameters:

Parameter

Description

yourConsumerReference

String

Required

Unique reference to anonymously identify your customer.

Advisable to use GUIDs.

Must be below 40 characters.

yourPaymentReference

String

Required

Set your unique reference for this payment. 

Format:

  • Maximum length 50 characters.

This value should be unique in order to protect your customers against duplicate transactions. 

With a server side integration, if a payment reference is not supplied, the transaction will not be processed.

yourPaymentMetaData

Object

Optional

Additional information associated with a transaction to help reconcile.

judoId

String

Required

Unique ID supplied by Judopay.

Specific to a merchant and/or location.

Format:

  • 100100100

  • Maximum length 9 characters.

  • Do not include spaces or dashes.

amount

Float

Required

The amount to process. 

Format:

  • Two decimal places

For currencies using a different structure please contact Judopay for support.

cardToken

String

Required

Save the cardToken into your database to send back to Judopay, instead of inserting the consumer's card details.

currency

String

Required

The currency of the transaction. 

Any ISO 4217 alphabetic currency code:

  • GBP

  • USD

  • EUR

expiryDate

String

Required

The expiry date of the card.

Format: 

  • MM/YY

cv2

String

Required

The 3 or 4 digit number on the back of a credit card.

Also known as the card verification value (CVV) or security code.

cardAddress

Array

Optional

Card holder's address.

mobileNumber

String

Optional

Consumer’s valid UK mobile number.

emailAddress

String

Optional

Consumer’s valid email address.

clientDetails

Object

Optional

A set of fraud signals sent by the mobile SDKs:

  • kdeviceid

  • vdeviceid

dynamicDescriptor

String

Optional

The merchant’s ‘Trading Name’ that will appear on the consumer’s statement. The value is returned in the response within the appearsOnStatement field.

Format:

  • Maximum 25 characters in length.

primaryAccountDetails

Object

Optional

Primary Account Holder Details:

  • Name

  • AccountNumber

  • DateOfBirth

  • PostCode

initialRecurringPayment

Boolean

Optional

Indicates if this initial payment is part of a recurring payment.

recurringPayment

Boolean

Optional

Indicates if this is a recurring payment.

Note: If recurringPayment = true, remember to send the recurringPaymentType.

relatedReceiptId

String

Optional

The receiptId returned from the first subscription payment.

Adding the relatedReceiptId references the subsequent recurring transactions to the original transaction.

recurringPaymentType

Object

Optional

Type of recurring payment.

Values:

  • RECURRING

    Scheduled regular payment.

  • MIT (Merchant Initiated Transaction)

    Unscheduled regular payment.

Note: recurringPaymentType is required if recurringPayment = true.

  1. Send the token payment:

try {
        $tokenPaymentResponse = $tokenPayment->create();
        // Handle successful payment    
        } catch (\Exception $e) {
        // Handle the errors
        return;
    }
  1. Check the result. See paymentReceipt Model.

Creating a Payment

Tip

When handling exceptions, it is good practice to use Try Catch Block.

  1. Prepare the payment:

   $payment = $judopay->getModel('Payment');    
   $attributes = [
        'amount' => 1.10,
        'cardNumber' => '4976000000003436',
        'expiryDate' => '12/25',
        'yourConsumerReference' => 'consumerRef',
        'yourPaymentReference' => 'paymentRef',
        'cv2' => '452',
        'currency' => 'GBP',
        'judoId' => '100200300'
    ];   $payment->setAttributeValues($attributes);    

Payment Model Parameters:

Parameter

Description

yourConsumerReference

String

Required

Unique reference to anonymously identify your customer.

Advisable to use GUIDs.

Must be below 40 characters.

yourPaymentReference

String

Required

Set your unique reference for this payment. 

Format:

  • Maximum length 50 characters.

This value should be unique in order to protect your customers against duplicate transactions. 

With a server side integration, if a payment reference is not supplied, the transaction will not be processed.

yourPaymentMetaData

Object

Optional

Additional information associated with a transaction to help reconcile.

judoId

String

Required

Unique ID supplied by Judopay.

Specific to a merchant and/or location.

Format:

  • 100100100

  • Maximum length 9 characters.

  • Do not include spaces or dashes.

amount

Float

Required

The amount to process. 

Format:

  • Two decimal places

For currencies using a different structure please contact Judopay for support.

cardNumber

String

Required

Submitted without whitespace or non-numeric characters.

currency

String

Required

The currency of the transaction. 

Any ISO 4217 alphabetic currency code:

  • GBP

  • USD

  • EUR

expiryDate

String

Required

The expiry date of the card.

Format: 

  • MM/YY

cv2

String

Required

The 3 or 4 digit number on the back of a credit card.

Also known as the card verification value (CVV) or security code.

cardAddress

Array

Optional

Card holder's address:

mobileNumber

String

Optional

Consumer’s valid UK mobile number.

emailAddress

String

Optional

Consumer’s valid email address.

clientDetails

Object

Optional

A set of fraud signals sent by the mobile SDKs:

  • kdeviceid

  • vdeviceid

dynamicDescriptor

String

Optional

The merchant’s ‘Trading Name’ that will appear on the consumer’s statement. The value is returned in the response within the appearsOnStatement field.

Format:

  • Maximum 25 characters in length.

primaryAccountDetails

Object

Optional

Primary Account Holder Details:

  • Name

  • AccountNumber

  • DateOfBirth

  • PostCode

initialRecurringPayment

Boolean

Optional

Indicates if this initial payment is part of a recurring payment.

recurringPayment

Boolean

Optional

Indicates if this is a recurring payment.

Note: If recurringPayment = true, remember to send the recurringPaymentType.

relatedReceiptId

String

Optional

The receiptId returned from the first subscription payment.

Adding the relatedReceiptId references the subsequent recurring transactions to the original transaction.

recurringPaymentType

Object

Optional

Type of recurring payment.

Values:

  • RECURRING

    Scheduled regular payment.

  • MIT (Merchant Initiated Transaction)

    Unscheduled regular payment.

Note: recurringPaymentType is required if recurringPayment = true.

  1. Send the payment:

       try {
            $response = $payment->create();
            // Handle successful payment
            return;
                } catch (\Exception $e) {
                echo $e->getMessage();
            // Handle the errors 
            return;
        }
  2. Check the result.

    For the purpose of this exercise, the payment is successful:

        Array
        (
            [receiptId] => 520882
            [type] => Payment
            [createdAt] => 2014-08-18T16:28:39.6164+01:00
            [result] => Success
            ...
            [amount] => 1.10
            ...	
            [yourPaymentReference] => 12345
        )
    

See, paymentReceipt Model.

3D Secure 2 Transaction Flow

Authenticate a 3D Secure 2 transaction to allow for additional transaction checks required for compliance with Strong Customer Authentication (SCA).

For more information on 3D Secure 2 and SCA, see What is Strong Customer Authentication??

  1. The Payment Model you created for Creating a Payment, just needs the following additional 3D Secure 2 parameters to be included:

  $payment = $judopay->getModel('Payment');    
   $attributes = [     
    ...
        'cardHolderName' => 'First Last',
        'mobileNumber' => '07999999999',
        'phoneCountryCode' => '41',
        'emailAddress' => 'contact@judopay.com',
        'threeDSecure' => [
            'authenticationSource' => 'BROWSER',
            'methodCompletion' => 'no'
        ]
    ];   

Parameter

Description

cardAddress

Object

Card holder address.

  • address1

  • address2

  • town

  • postcode

  • countryCode

cardHolderName

String

The full name of the card holder.

Note: When testing in the sandbox environment, it is the cardHolderName that is used to determine the test card for 3D Secure 2 authentication.

Format:

  • Alphanumeric

  • Length: 2-45 characters

  • Allowed special characters: [.-'␣]

phoneCountryCode

String

The country code of the consumer's phone.

mobileNumber

String

Consumer’s valid UK mobile number.

emailAddress

String

Consumer’s valid email address.

authenticationSource

String

Indicates the type of channel used to initiate the transaction.

Format:

  • enum

Values:

  • Browser

  • Stored_Recurring

  • Mobile_Sdk

    Additional fields generated by the 3DS SDK will need to be passed to the 3D Secure Server in order to allow for device data gathering and challenge request handling.

    When a challenge is required, the challenge URL is not returned in the response but instead, is encoded in the acsSignedcontent returned to the 3DS SDK by the ACS.

    This should be used by the 3DS SDK to complete the challenge flow in app.

challengeRequestIndicator

String

Indicates the type of challenge request to be set.

Values:

  • NoPreference

  • NoChallenge

    No challenge required.

  • ChallengePreferred

    A challenge is preferred for this transaction.

  • ChallengeAsMandate

    Must challenge this transaction.

scaExemption

String

The customer initiated transaction type, that can be applied to be exempt from SCA.

Values:

  • LowValue = 0

  • SecureCorporate = 1

  • TrustedBeneficiary = 2

  • TransactionRiskAnalysis = 3

methodCompletion

String

Indicates if the 3DS ACS method to collect the device details was completed successfully.

Values:

  • Yes

  • No

  • Unavailable

methodNotificationUrl

String

If the Issuer successfully completes the device details check, the invisible iframe rendered from the methodUrl to collect the device data, is redirected to the methodNotificationUrl where the method completion message is received.

Format:

  • URL

  • Length: 1-256 characters

If this URL is not set, then a default Judopay-hosted URL will be used.

challengeNotificationUrl

String

If the consumer successfully completes their additional SCA details check, the iframe rendered from the challengeUrl is redirected to the challengeNotificationUrl where the outcome of the challenge request is received.

Format:

  • URL

  • Length: 1-256 characters

If this URL is not set, then a default Judopay-hosted URL will be used.

  1. Send the 3D Secure 2 payment:

 try
    {
        $cardPayment->setAttributeValues($attributes);
        $response = $cardPayment->create();
    } catch (\Exception $e) {
        return;
    }

Note

If no additional transaction checks are required, you will receive the usual paymentReceipt response.

If additional transaction checks are required, you will receive the challenge response.

  1. Check the response. For the purpose of this exercise the challenge response has been returned, requesting: "Additional device data is needed for 3D Secure 2".

  1. Once the additional device data has been collected, resume the transaction flow to Judopay: ResumeThreeDSecureTwo:

        $resumeRequest = $judopay3ds2->getModel('ResumeThreeDSecureTwo');
        $attributes = [
            'receiptId' => $response['receiptId'],
            'cv2' => '452',
            'methodCompletion' => 'no'
        ];
        $resumeRequest->setAttributeValues($attributes);       
 $response = $resumeRequest->update();

Caution

Use the ReceiptId from the original response.

  1. Check the response. For the purpose of this exercise, the completion response has been returned, requesting: "Challenge completion is needed for 3D Secure 2":

Note

If no additional transaction checks are required, you will receive the usual paymentReceipt response.

If additional transaction checks are required, you will receive the completion response.

  1. Complete the transaction flow to Judopay, CompleteThreeDSecureTwo:

        $completeRequest = $judopay3ds2->getModel('CompleteThreeDSecureTwo');
        $attributes = [
            'receiptId' => $response['receiptId'],
            'cv2' => '452'
        ];
        $completeRequest->setAttributeValues($attributes);       
 $response = $completeRequest->update();
  1. Check the response paymentReceipt Model.

Creating a Refund

  1. Prepare the refund:

    $refund = $judopay->getModel('Refund');    
        $refundAttributes = [
        'amount' => 1.10,
        'receiptId' => $receiptId,
        'yourPaymentReference' => 'qsdfg'
    ];    $refund->setAttributeValues($refundAttributes);

Refund Model Parameters:

Parameter

Description

receiptId

String

Required

Judopay’s reference for the transaction. 

Required for you to process the refund.

Get the receiptId from the original transaction response.

yourPaymentReference

String

Required

Set your unique reference for this payment. 

Format:

  • Maximum length 50 characters.

This value should be unique in order to protect your customers against duplicate transactions. 

With a server side integration, if a payment reference is not supplied, the transaction will not be processed.

amount

Float

Required

The amount to process. 

Format:

  • Two decimal places

For currencies using a different structure please contact Judopay for support.

  1. Send the refund:

    try {
        $response = $refund->create();
        // Handle successful refund   
          return;
            } catch (\Exception $e) {
            echo $e->getMessage();
        // Handle the errors 
        return;
    }
  1. Check the response: paymentReceipt Model.

Creating a PreAuth

  1. Prepare the preauth:

$preauth = $judopay->getModel('Preauth');    
        $attributes = [
        'amount' => 1.10,
        'cardNumber' => '4976000000003436',
        'expiryDate' => '12/25',
        'yourConsumerReference' => 'azerty',
        'yourPaymentReference' => 'azerty',
        'cv2' => '452',
        'currency' => 'GBP',
        'judoId' => '100915867'
    ];  $preauth->setAttributeValues($attributes);

Preauth Model Parameters:

Parameter

Description

yourConsumerReference

String

Required

Unique reference to anonymously identify your customer.

Advisable to use GUIDs.

Must be below 40 characters.

yourPaymentReference

String

Required

Set your unique reference for this payment. 

Format:

  • Maximum length 50 characters.

This value should be unique in order to protect your customers against duplicate transactions. 

With a server side integration, if a payment reference is not supplied, the transaction will not be processed.

yourPaymentMetaData

Object

Optional

Additional information associated with a transaction to help reconcile.

judoId

String

Required

Unique ID supplied by Judopay.

Specific to a merchant and/or location.

Format:

  • 100100100

  • Maximum length 9 characters.

  • Do not include spaces or dashes.

amount

Float

Required

The amount to process. 

Format:

  • Two decimal places

For currencies using a different structure please contact Judopay for support.

cardNumber

String

Required

Submitted without whitespace or non-numeric characters.

currency

String

Required

The currency of the transaction. 

Any ISO 4217 alphabetic currency code:

  • GBP

  • USD

  • EUR

expiryDate

String

Required

The expiry date of the card.

Format: 

  • MM/YY

cv2

String

Required

The 3 or 4 digit number on the back of a credit card.

Also known as the card verification value (CVV) or security code.

cardAddress

Array

Optional

Card holder's address:

mobileNumber

String

Optional

Consumer’s valid UK mobile number.

emailAddress

String

Optional

Consumer’s valid email address.

clientDetails

Object

Optional

A set of fraud signals sent by the mobile SDKs:

  • kdeviceid

  • vdeviceid

dynamicDescriptor

String

Optional

The merchant’s ‘Trading Name’ that will appear on the consumer’s statement. The value is returned in the response within the appearsOnStatement field.

Format:

  • Maximum 25 characters in length.

primaryAccountDetails

Object

Optional

Primary Account Holder Details:

  • Name

  • AccountNumber

  • DateOfBirth

  • PostCode

initialRecurringPayment

Boolean

Optional

Indicates if this initial payment is part of a recurring payment.

recurringPayment

Boolean

Optional

Indicates if this is a recurring payment.

Note: If recurringPayment = true, remember to send the recurringPaymentType.

relatedReceiptId

String

Optional

The receiptId returned from the first subscription payment.

Adding the relatedReceiptId references the subsequent recurring transactions to the original transaction.

recurringPaymentType

Object

Optional

Type of recurring payment.

Values:

  • RECURRING

    Scheduled regular payment.

  • MIT (Merchant Initiated Transaction)

    Unscheduled regular payment.

Note: recurringPaymentType is required if recurringPayment = true.

  1. Send the preauth:

    try {
        $response = $preauth->create();
        // Handle successful payment
        return;
    } catch (\Exception $e) {
       echo $e->getMessage();
        // Handle the errors
        return;
    }
  1. Check the result: paymentReceipt Model.

If the preauth response = successful, collect the preauth amount: Creating a Collection.

Note

Partial collections are supported. Use the same ReceiptId to collect different amounts up to the original preauth amount.

You cannot collect more than the original amount.

Creating a Collection

  1. Prepare the collection:

    $collection = $judopay->getModel('Collection');   
        $collectionAttributes = [
        'amount' => 1.10,
        'receiptId' => $receiptId,
        'yourPaymentReference' => 'qsdfg'
    ];    $collection->setAttributeValues($collectionAttributes);

Collection Model Parameters:

Parameter

Description

receiptId

String

Required

Judopay’s reference for the transaction. 

Required for you to process the collection.

Get the receiptId from the original preauth transaction response.

yourPaymentReference

String

Required

Set your unique reference for this payment. 

Format:

  • Maximum length 50 characters.

This value should be unique in order to protect your customers against duplicate transactions. 

With a server side integration, if a payment reference is not supplied, the transaction will not be processed.

amount

Float

Required

The amount to process. 

Format:

  • Two decimal places

For currencies using a different structure please contact Judopay for support.

  1. Send the collection:

try {
    $response = $collection->create();
    // Handle successful collection} 
        return;
            } catch (\Exception $e) {
            echo $e->getMessage();
        // Handle the errors 
       return;
    }
  1. Check the response: paymentReceipt Model.

Parameter

Description

receiptId

String

Judopay's reference for the transaction

Used to process refunds or collections.

yourPaymentReference

String

Your unique reference for this payment. 

This value should be unique in order to protect your customers against duplicate transactions. 

With a server side integration, if a payment reference is not supplied, the transaction will not be processed.

type

String

Type of transaction:

  • Payment

  • Refund

  • PreAuth

  • Collection

  • Register

    Note! This transaction type is available from API Version 6.4.1 onwards.

AcquirerTransactionID

String

The unique ID of a transaction set by the acquirer.

createdAt

Date

An ISO8601 formatted date and time.

Includes time zone offset.

result

String

Result of transaction.

message

String

Message detailing the outcome.

externalBankResponseCode

String

Reason code provided by the bank for declined transactions.

judoId

String

Unique ID supplied by Judopay. 

Specific to a merchant and/or location.

merchantName

String

Merchant's trading name.

appearsOnStatementAs

String

How the Merchant appears on the consumer's statement.

originalAmount

Decimal

Amount of transaction.

Note: This field will not be included for Refund and PreAuth transaction types.

amountCollected

Decimal

Amount collected.

Note: This field will be included for the PreAuth transaction type.

netAmount

Decimal

The remaining balance of the transaction after a refund.

You cannot refund more than the original transaction amount.

amount

Decimal

The amount to process. 

Format:

  • Two decimal places

For currencies using a different structure please contact Judopay for support.

currency

String

The currency of the transaction.

Any ISO 4217 alphabetic currency code:

  • GBP

  • USD

  • EUR

cardDetails

Object

Information on the card used in this transaction:

  • cardLastFour

  • endDate

  • cardToken

  • cardType

  • startDate

  • cardScheme

  • cardFunding

  • cardCategory

  • cardQualifier

  • cardCountry

  • bank

consumer

Object

Details of the consumer.

Used for repeat transactions.

Details:

  • consumerToken

  • yourConsumerReference

device

Object

Specific device details to identify a consumer:

  • identifier

riskScore

Integer

Consumer's risk score.

yourPaymentMetaData

String

Additional information associated with a transaction to help reconcile.

threeDSecure

Object

For any 3DSecure requests.

Includes the result of the authentication process:

  • attempted

  • result

risks

Object

Risk checks on:

  • postCodeCheck

  • cv2Check

  • merchantSuggestion

  • merchantStatistics

recurring

Boolean

Is the transaction a recurring transaction?

If false, the field will not be returned.

Going Live with PHP

Test all your required transaction types in the live environment.

Note

You will need to have tested your app in the sandbox environment before going live.

Use the test cards provided in the Judopay Portal: Tools > Generating transactions.

1. Activate your Account

  • To process live payments, ensure you have a live account.

  • Complete the activation form for us to make the necessary changes to your account. 

    We will contact you as soon as you are live.

2. Point to the Live Environment

  • In the Judopay object , change the production environment setting from false to true: 'useProduction' => true

  • Replace your sandbox API Token and Secret for the live API Token and Secret.

    (Find these in Judopay Portal > Your apps > {app name} > Live Tokens)

    $judopay = new \Judopay(
        array(
            'apiToken' => 'your-token,
            'apiSecret' => 'your-secret',
            'judoId' => 'your-judo-id',
            //Set to true on production, defaults to false which is the sandbox
            'useProduction' => true
        )
    );