Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
require_once('Tinypayme.php');
$t = new Tinypayme($mashape_api_key);
$request = $t->createItem(
$access_token = $access_token,
$title =stripslashes($data['title']),
$currency = $data['currency'],
$price = $data['price'],
$description = $data['description'],
$tags = $data['tags'],
$quantity = -1,
$require_shipment_address = null,
$shipment_countries = null,
$shipment_costs = null,
$shipment_costs_per_item = null,
$geo_latitude = $data['geo_latitude'],
$geo_longitude = $data['geo_longitude'],
$image_tokens = $image_token,
$file_token = $file_token,
$video_url = null,
$charity_id = null,
$charity_percentage = null,
$language = null,
$country = null,
$marketplace_category_id = null
);
if(isset($request->result->item_id)){
$item_id = $request->result->item_id;
// show link
echo ' done! see <a href="http://tinypay.me/~'.$item_id.'" target="_blank">http://tinypay.me/~'.$item_id.'</a><p>';
// show item thumbnail
echo '<p><a href="http://tinypay.me/~'.$item_id.'" target="_blank"><img src="http://img.tinypay.me/btn/'.$item_id.'" border="0" title="'.$data['title'].'"/></a></p>';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.