Function Hook_payment_gateway_paypal->make_cart_transaction_button
Definitions
sources/hooks/systems/payment_gateway/paypal.php
- Make a transaction (payment) button for multiple shopping cart items.This is for IPN-style transactions (as opposed to local transactions).Optional method, provides more detail than make_transaction_button.
- 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 |
| $items | array | No | No | required parameter | N/A | N/A | Items array |
| $shipping_cost | float | No | No | required parameter | N/A | N/A | Shipping cost |
| $currency | ID_TEXT | No | No | required parameter | N/A | N/A | Currency symbol |
| $order_id | AUTO_LINK | No | No | required parameter | N/A | N/A | Order ID |
Returns
- The button
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Make a transaction (payment) button for multiple shopping cart items.This is for IPN-style transactions (as opposed to local transactions).Optional method, provides more detail than make_transaction_button.
*
* @param ID_TEXT $trans_expecting_id Our internal temporary transaction ID
* @param array $items Items array
* @param float $shipping_cost Shipping cost
* @param ID_TEXT $currency Currency symbol
* @param AUTO_LINK $order_id Order ID
* @return Tempcode The button
*/
public function make_cart_transaction_button(string $trans_expecting_id, array $items, float $shipping_cost, string $currency, int $order_id) : object
* Make a transaction (payment) button for multiple shopping cart items.This is for IPN-style transactions (as opposed to local transactions).Optional method, provides more detail than make_transaction_button.
*
* @param ID_TEXT $trans_expecting_id Our internal temporary transaction ID
* @param array $items Items array
* @param float $shipping_cost Shipping cost
* @param ID_TEXT $currency Currency symbol
* @param AUTO_LINK $order_id Order ID
* @return Tempcode The button
*/
public function make_cart_transaction_button(string $trans_expecting_id, array $items, float $shipping_cost, string $currency, int $order_id) : object

