This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Return the value of an array closests to zero | |
| * @param array $ts | |
| * @return int | |
| * @see https://ourcodeworld.com/articles/read/1042/how-to-find-the-closest-value-to-zero-from-an-array-with-positive-and-negative-numbers-in-php | |
| **/ | |
| function closeToZero(array $ts) :int | |
| { | |
| if(empty($ts)){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| GetSingleItem | |
| https://developer.ebay.com/DevZone/shopping/docs/CallRef/GetSingleItem.html | |
| GetSingleItemRequestType | |
| https://developer.ebay.com/Devzone/shopping/docs/CallRef/types/GetSingleItemRequestType.html | |
| SDK | |
| https://github.com/davidtsadler/ebay-sdk-examples/blob/master/shopping/02-get-single-item.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| GetCategoryInfo | |
| https://developer.ebay.com/devzone/shopping/docs/callref/GetCategoryInfo.html#Samples | |
| SDK | |
| https://github.com/davidtsadler/ebay-sdk-examples/blob/master/shopping/03-get-category-info.php | |
| */ | |
| require_once '_inc.php'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @since v0.1.0 | |
| * @package Dev-PHP | |
| * @author Andre Board <dre.board@gmail.com> | |
| * @version v1.0 | |
| * @access public | |
| * @see https://github.com/davidtsadler/ebay-sdk-examples/blob/master/shopping/02-get-single-item.php | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Get My Selling getSellerOrders (GetOrdersRequestType) | |
| * @return \Illuminate\Http\JsonResponse|mixed | |
| * @see https://developer.ebay.com/devzone/xml/docs/reference/ebay/getmyebayselling.html | |
| * @see https://developer.ebay.com/DevZone/XML/docs/Reference/ebay/GetOrders.html#Request.CreateTimeFrom | |
| * @see https://stackoverflow.com/questions/30254723/how-to-fetch-my-listings-of-product-from-ebay | |
| * {@internal TESTED}} | |
| */ | |
| public function getSellerOrders(int $days = null) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| GetSingleItem | |
| Using either the SDK or raw eBay API call, get an item by itemID. You can use the XML or URl versions | |
| @see https://developer.ebay.com/DevZone/shopping/docs/CallRef/GetSingleItem.html#samplebasic | |
| ------------------------------------------------------------------------------------------------------- | |
| -- URL version | |
| https://open.api.ebay.com/shopping? | |
| callname=GetSingleItem& |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //header('Content-Type: text/xml'); | |
| /* | |
| getOrders | |
| https://developer.ebay.com/api-docs/sell/fulfillment/resources/order/methods/getOrders | |
| Use this call to search for and retrieve one or more orders based on their creation date, | |
| last modification date, or fulfillment status using the filter parameter. | |
| You can alternatively specify a list of orders using the orderIds parameter. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| error_reporting(E_ALL); | |
| try{ | |
| $version = '1.0.0'; // API version supported by your application | |
| $globalid = 'EBAY-US'; // Global ID of the eBay site you want to search (e.g., EBAY-DE) | |
| //$query = $_POST['search']; | |
| $query = 'Samsung galaxy note 9'; // You may want to supply your own query | |
| $safequery = urlencode($query); // Make the query URL-friendly | |
| $affiliate_trackingId = 'TRACKING'; | |
| $affiliate_customId = 'test'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Place in root dir NOT public dir | |
| <IfModule mod_rewrite.c> | |
| <IfModule mod_negotiation.c> | |
| Options -MultiViews | |
| </IfModule> | |
| RewriteEngine On | |
| RewriteCond %{REQUEST_FILENAME} -d [OR] | |
| RewriteCond %{REQUEST_FILENAME} -f | |
| RewriteRule ^ ^$1 [N] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| error_reporting(E_ALL); | |
| ini_set('html_errors', 0); | |
| ?> | |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <title>PHP IDE</title> |
NewerOlder