Function Hook_payment_gateway_paypal->make_transaction_button

Definitions

sources/hooks/systems/payment_gateway/paypal.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
$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
$shipping_cost float No No required parameter N/A N/A Shipping cost
$currency ID_TEXT No No required parameter N/A N/A The currency to use

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 $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  float $shipping_cost Shipping cost
 * @param  ID_TEXT $currency The currency to use
 * @return Tempcode The button
 */

public function make_transaction_button(string $trans_expecting_id, string $type_code, string $item_name, string $purchase_id, float $price, float $tax, float $shipping_cost, string $currency) : object