iban_mod97_10_checksum

The WooCommerce Germanized iban mod97 10 checksum function.

Description

iban_mod97_10_checksum( $numeric_representation ); 

Parameters (1)

0. $numeric_representation
The numeric representation.

Usage

  1. if ( !function_exists( 'iban_mod97_10_checksum' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-germanized/includes/libraries/iban/php-iban.php'; 
  3.  
  4. // The numeric representation. 
  5. $numeric_representation = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = iban_mod97_10_checksum($numeric_representation); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/libraries/iban/php-iban.php  
  1. function iban_mod97_10_checksum($numeric_representation) { 
  2. $checksum = intval(substr($numeric_representation, 0, 1)); 
  3. for ($position = 1; $position < strlen($numeric_representation); $position++) { 
  4. $checksum *= 10; 
  5. $checksum += intval(substr($numeric_representation, $position, 1)); 
  6. $checksum %= 97; 
  7. return $checksum;