<?php /** Payment Notification Hook for Gumroad Webhook for Gumroad @see https://gumroad.com/settings/developer @see https://gumroad.com/ping @see https://gumroad.com/webhooks */ if (empty($_GET['salt'])) { radix::bail(400); } _api_log_request(); /* * order_number * seller_id * product_id * product_permalink * email (the email of the buyer) * full_name (if present, the name of the buyer) * price (the price paid, in USD cents) * variants (if present, an array of each variant choice: ['blue', 'small']) * offer_code (if present) * test (if you are buying your own product, for testing purposes) * custom_fields (if present, a dictionary {'name' : 'john smith', 'spouse name' : 'jane smith'}) * shipping_information (if present, a dictionary) * is_recurring_charge (if relevant, a boolean) * is_preorder_authorization (if relevant, a boolean) * revenue_share_amount_cents (if releva */ // If it's a Webhook Request?
/** Sends the Results from the exec() and view() as page @return 200|404 */ static function send() { ob_start(); // Bail on Error? // die('self::$_view_res ' . self::$_view_res . "\n"); if (self::$_view_res !== self::OK) { $v = self::$_view_res; self::$_view_res = self::OK; radix::bail($v); return 0; } $list = array(sprintf('%s/theme/%s.php', self::$root, self::$theme_name)); if (self::$view->_include($list)) { ob_end_flush(); return 0; } // No Layout? Use This Built-In if (empty($_ENV['title'])) { $_ENV['title'] = 'radix'; } echo "<!doctype html>\n"; echo "<html>\n"; echo '<head><meta http-equiv="content-type" content="text/html;charset=utf-8" />'; echo '<title>' . $_ENV['title'] . '</title>'; echo '</head><body>'; echo '<div>' . self::$view->body . '</div>'; echo '</body></html>'; ob_end_flush(); }