Function Hook_payment_gateway_authorize->make_subscription_button

Definitions

sources/hooks/systems/payment_gateway/authorize.php

  • Make a subscription (payment) button.This is for IPN-style transactions (as opposed to local transactions).
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: object

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$trans_expecting_id ID_TEXT No No required parameter N/A N/A Our internal temporary transaction ID
$type_code ID_TEXT No No required parameter N/A N/A The product codename
$item_name SHORT_TEXT No No required parameter N/A N/A The human-readable product title
$purchase_id ID_TEXT No No required parameter N/A N/A The purchase ID
$price float No No required parameter N/A N/A Transaction price in money
$tax float No No required parameter N/A N/A Transaction tax in money
$currency ID_TEXT No No required parameter N/A N/A The currency to use
$length integer No No required parameter N/A N/A The subscription length in the units
$length_units ID_TEXT No No required parameter d w m y N/A The length units

Returns

  • The button
  • Type: Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Make a subscription (payment) button.This is for IPN-style transactions (as opposed to local transactions).
 *
 * @param  ID_TEXT $trans_expecting_id Our internal temporary transaction ID
 * @param  ID_TEXT $type_code The product codename
 * @param  SHORT_TEXT $item_name The human-readable product title
 * @param  ID_TEXT $purchase_id The purchase ID
 * @param  float $price Transaction price in money
 * @param  float $tax Transaction tax in money
 * @param  ID_TEXT $currency The currency to use
 * @param  integer $length The subscription length in the units
 * @param  ID_TEXT $length_units The length units
 * @set d w m y
 * @return Tempcode The button
 */

public function make_subscription_button(string $trans_expecting_id, string $type_code, string $item_name, string $purchase_id, float $price, float $tax, string $currency, int $length, string $length_units) : object