Function __global->store_shipping_address

Definitions

sources/ecommerce_shipping.php

  • Store shipping address for a transaction.We try and merge it with one we already have on record in a sensible way.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$trans_expecting_id ID_TEXT No No required parameter N/A N/A Expected transaction ID
$txn_id ID_TEXT No No Blank (empty string) N/A N/A Transaction ID (blank: not set yet)
$shipping_address ?array No No Null N/A N/A Shipping address (null: get from POST parameters)

Returns

  • Address ID (null: none saved)
  • Type: ?AUTO_LINK
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Store shipping address for a transaction.We try and merge it with one we already have on record in a sensible way.
 *
 * @param  ID_TEXT $trans_expecting_id Expected transaction ID
 * @param  ID_TEXT $txn_id Transaction ID (blank: not set yet)
 * @param  ?array $shipping_address Shipping address (null: get from POST parameters)
 * @return ?AUTO_LINK Address ID (null: none saved)
 */

function store_shipping_address(string $trans_expecting_id, string $txn_id = '', ?array $shipping_address = null) : ?int