Direct Payment Integrator V6 - Online Help
Direct Payment Integrator V6
Questions / Feedback?

GlobalCardValidator Class

Properties   Methods   Events   Configuration Settings   Errors  

The GlobalCardValidator component is used to verify with Global Payments that a given card number is formatted properly, and could be a valid card number. Validating a card before actually submitting a transaction for authorization can reduce the fees that may be associated with invalid or declined transactions.

Class Name

InPayDirect_GlobalCardValidator

Procedural Interface

 inpaydirect_globalcardvalidator_open();
 inpaydirect_globalcardvalidator_close($res);
 inpaydirect_globalcardvalidator_register_callback($res, $id, $function);
 inpaydirect_globalcardvalidator_get_last_error($res);
 inpaydirect_globalcardvalidator_get_last_error_code($res);
 inpaydirect_globalcardvalidator_set($res, $id, $index, $value);
 inpaydirect_globalcardvalidator_get($res, $id, $index);
 inpaydirect_globalcardvalidator_do_config($res, $configurationstring);
 inpaydirect_globalcardvalidator_do_getdebitnetworkinfo($res);
 inpaydirect_globalcardvalidator_do_interrupt($res);
 inpaydirect_globalcardvalidator_do_iscommercialcard($res);
 inpaydirect_globalcardvalidator_do_reset($res);
 inpaydirect_globalcardvalidator_do_validatecard($res);

Remarks

Utilization of this class catches accidentally mistyped card numbers and allows buyers to re-input their number without having the transaction declined. It can also determine the type of credit card (Visa, MasterCard, Discover, etc) so that you can easily determine if the customer is presenting a payment type which you do not support. The class can also parse swiped track data and perform these same checks on it.

There are four checks performed by the ValidateCard method on the customer's credit card information:

  • The card number is checked for validity using the Luhn mod-10 algorithm.
  • The type of the card (Visa, MasterCard, etc.) is computed from the card number.
  • The expiration date is checked against the current system date.
  • The length of the card number is checked to see if it's a valid length for the computed card type.

In addition, the IsCommercialCard method will attempt to determine if the specified CardNumber is a commercial or purchasing card, and the GetDebitNetworkInfo method will attempt to determine if the CardNumber is a debit card. This way you can pass Level 2 data (Tax amount and purchase order number) for commercial cards, or ask for a PIN for debit cards, and receive a lower interchange rate for the transaction.

This class will query the Global Transport Server to perform the above checks. The UserId and Password is only required for the GetDebitNetworkInfo method, neither IsCommercialCard or ValidateCard require authentication to use. The first three checks made by the ValidateCard method may also be performed off-line by setting the ValidationMode configuration setting to "Local" instead of "Global". In this case, the mod-10 check will be computed mathematically by the class, and the expiration date will be checked against the current system time. The CardTypeDescription will be computed using an internal set of rules, but do note that these will not be as up-to-date as the rules the Global Payments Server uses. The length check will only be performed when ValidationMode is set to "Global" mode.

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

CardExpMonthExpiration month of the card specified in CardNumber .
CardExpYearExpiration month of the card specified in CardNumber .
CardNumberCard number to be validated.
CardTypeIndicates the results of the Luhn Digit Check algorithm.
CardTypeDescriptionHuman-readable description of the CardType .
DateCheckPassedIndicates whether the card is expired or not.
DigitCheckPassedIndicates the results of the Luhn Digit Check algorithm.
LengthCheckPassedIndicates the results of the card number length check.
NetworkInfoAuthorizerNumberTwo-digit code that identifies the debit network.
NetworkInfoCodeContains the transaction result code from the Global Transport Gateway.
NetworkInfoIdIdentification code for the debit network.
NetworkInfoNameName of the debit network.
NetworkInfoOfflineSupportedIndicates whether offline transactions are supported for the debit network.
PasswordPassword for authentication with the Global Payments Server .
ProxyAuthSchemeThis property is used to tell the component which type of authorization to perform when connecting to the proxy.
ProxyAutoDetectThis property tells the component whether or not to automatically detect and use proxy system settings, if available.
ProxyPasswordThis property contains a password if authentication is to be used for the proxy.
ProxyPortThis property contains the TCP port for the proxy Server (default 80).
ProxyServerIf a proxy Server is given, then the HTTP request is sent to the proxy instead of the server otherwise specified.
ProxySSLThis property determines when to use SSL for the connection to the proxy.
ProxyUserThis property contains a user name, if authentication is to be used for the proxy.
ServerGlobal Payments transaction server.
SSLAcceptServerCertEncodedThe certificate (PEM/base64 encoded).
SSLCertEncodedThe certificate (PEM/base64 encoded).
SSLCertStoreThe name of the certificate store for the client certificate.
SSLCertStorePasswordIf the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store.
SSLCertStoreTypeThe type of certificate store for this certificate.
SSLCertSubjectThe subject of the certificate used for client authentication.
SSLServerCertEncodedThe certificate (PEM/base64 encoded).
TimeoutA timeout for the component.
TrackDataMagnetic stripe data read off the card.
TrackTypeIndicates the type of the specified TrackData .
UserIdUserId for authentication with the Global Payments Server .

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

ConfigSets or retrieves a configuration setting .
GetDebitNetworkInfoDetermines if the card is a debit card, and which network it belongs to.
InterruptInterrupt the current method.
IsCommercialCardIndicates whether or not the CardNumber is for a commercial/purchasing card.
ResetClears all properties to their default values.
ValidateCardChecks the card number and expiration date for validity.

Event List


The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.

ErrorInformation about errors during data delivery.
SSLServerAuthenticationFired after the server presents its certificate to the client.
SSLStatusShows the progress of the secure connection.
StatusShows the progress of the Global Payments connection.

Configuration Settings


The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.

ValidationModeDetermines whether to use the Global Utility services for validation, or compute it locally.
RawRequestReturns the request sent to the server for debugging purposes.
RawResponseReturns the response received from the server for debugging purposes.
ConnectionTimeoutSets a separate timeout value for establishing a connection.
FirewallAutoDetectTells the component whether or not to automatically detect and use firewall system settings, if available.
FirewallHostName or IP address of firewall (optional).
FirewallPasswordPassword to be used if authentication is to be used when connecting through the firewall.
FirewallPortThe TCP port for the FirewallHost;.
FirewallTypeDetermines the type of firewall to connect through.
FirewallUserA user name if authentication is to be used connecting through a firewall.
KeepAliveTimeThe inactivity time in milliseconds before a TCP keep-alive packet is sent.
KeepAliveIntervalThe retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received.
LingerWhen set to True, connections are terminated gracefully.
LingerTimeTime in seconds to have the connection linger.
LocalHostThe name of the local host through which connections are initiated or accepted.
LocalPortThe TCP port in the local host where the component binds.
MaxLineLengthThe maximum amount of data to accumulate when no EOL is found.
MaxTransferRateThe transfer rate limit in bytes per second.
RecordLengthThe length of received data records.
TCPKeepAliveDetermines whether or not the keep alive socket option is enabled.
UseIPv6Whether to use IPv6.
TcpNoDelayWhether or not to delay when sending packets.
TLS12SignatureAlgorithmsDefines the allowed TLS 1.2 signature algorithms when UseManagedSecurityAPI is True.
ReuseSSLSessionDetermines if the SSL session is reused.
SSLCipherStrengthThe minimum cipher strength used for bulk encryption.
SSLEnabledProtocolsUsed to enable/disable the supported security protocols.
SSLProviderThe name of the security provider to use.
SSLSecurityFlagsFlags that control certificate verification.
OpenSSLCADirThe path to a directory containing CA certificates.
OpenSSLCAFileName of the file containing the list of CA's trusted by your application.
OpenSSLCipherListA string that controls the ciphers to be used by SSL.
OpenSSLPrngSeedDataThe data to seed the pseudo random number generator (PRNG).
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
CodePageThe system code page used for Unicode to Multibyte translations.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 6.0.6240.0