Function __global->make_transaction_button
Definitions
sources/ecommerce.php
- Make a transaction (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 |
|---|---|---|---|---|---|---|---|
| $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 | REAL | No | No | required parameter | N/A | N/A | Transaction price in money (excluding tax and shipping) |
| $tax_derivation | array | No | No | required parameter | N/A | N/A | Transaction tax derivation |
| $tax | REAL | No | No | required parameter | N/A | N/A | Transaction tax in money (including shipping tax) |
| $tax_tracking | array | No | No | required parameter | N/A | N/A | Transaction tax tracking ID |
| $shipping_cost | REAL | No | No | required parameter | N/A | N/A | Transaction shipping cost in money |
| $shipping_tax | REAL | No | No | required parameter | N/A | N/A | Transaction shipping tax in money |
| $currency | ID_TEXT | No | No | required parameter | N/A | N/A | The currency to use |
| $price_points | integer | No | No | 0 | N/A | N/A | Transaction price in points |
| $payment_gateway | ?ID_TEXT | No | No | Null | N/A | N/A | The payment gateway the payment will go via (null: autodetect) |
Returns
- The button
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Make a transaction (payment) button.This is for IPN-style transactions (as opposed to local transactions).
*
* @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 REAL $price Transaction price in money (excluding tax and shipping)
* @param array $tax_derivation Transaction tax derivation
* @param REAL $tax Transaction tax in money (including shipping tax)
* @param array $tax_tracking Transaction tax tracking ID
* @param REAL $shipping_cost Transaction shipping cost in money
* @param REAL $shipping_tax Transaction shipping tax in money
* @param ID_TEXT $currency The currency to use
* @param integer $price_points Transaction price in points
* @param ?ID_TEXT $payment_gateway The payment gateway the payment will go via (null: autodetect)
* @return Tempcode The button
*/
function make_transaction_button(string $type_code, string $item_name, string $purchase_id, float $price, array $tax_derivation, float $tax, array $tax_tracking, float $shipping_cost, float $shipping_tax, string $currency, int $price_points = 0, ?string $payment_gateway = null) : object
* Make a transaction (payment) button.This is for IPN-style transactions (as opposed to local transactions).
*
* @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 REAL $price Transaction price in money (excluding tax and shipping)
* @param array $tax_derivation Transaction tax derivation
* @param REAL $tax Transaction tax in money (including shipping tax)
* @param array $tax_tracking Transaction tax tracking ID
* @param REAL $shipping_cost Transaction shipping cost in money
* @param REAL $shipping_tax Transaction shipping tax in money
* @param ID_TEXT $currency The currency to use
* @param integer $price_points Transaction price in points
* @param ?ID_TEXT $payment_gateway The payment gateway the payment will go via (null: autodetect)
* @return Tempcode The button
*/
function make_transaction_button(string $type_code, string $item_name, string $purchase_id, float $price, array $tax_derivation, float $tax, array $tax_tracking, float $shipping_cost, float $shipping_tax, string $currency, int $price_points = 0, ?string $payment_gateway = null) : object

