- <?php
- $userid = "[user id]";
- $userkey = "[user key]";
- $size = "11x17";
- $paperstock = "Premium Photo";
- $lamination = "None";
- $mounting = "None";
- $pdfurl = "[url of PDF]";
- $companyname = "Mimeo";
- $fullname = "Kin Lane";
- $firstname = "Kin";
- $lastname = "Lane";
- $careof = "";
- $streetaddress = "588 Sutter Street";
- $apartmentorsuite = "Suite 203";
- $city = "San Francisco";
- $state = "CA";
- $postalcode = "94102";
- $phone = "555-555-5555";
- $email = "kin.lane@mimeo.com";
- $isresidential = "true";
- $quantity = "1";
- $shippingchoice = "Ground";
- $paymentmethod = "CreditCard";
- $ccnumber = "[credit card number]";
- $ccname = "[name on credit card]";
- $ccpostalcode = "[billing postal code]";
- $cctype = "[credit card type]";
- $ccexpirationmonth = "[credit card expiration month]";
- $ccexpirationyear = "[credit card expiration year]";
- $format = "json";
- $environment = "Sandbox";
- $curl_handle = curl_init();
- curl_setopt($curl_handle, CURLOPT_URL, 'https://developer.mimeo.com/api/poster/placeorder/');
- curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($curl_handle, CURLOPT_POST, 1);
- curl_setopt($curl_handle, CURLOPT_POSTFIELDS, array(
- 'userid' => $userid,
- 'userkey' => $userkey,
- 'size' => $size,
- 'paperstock' => $paperstock,
- 'lamination' => $lamination,
- 'mounting' => $mounting,
- 'pdfurl' => $pdfurl,
- 'companyname' => $companyname,
- 'fullname' => $fullname,
- 'firstname' => $firstname,
- 'lastname' => $lastname,
- 'streetaddress' => $streetaddress,
- 'apartmentorsuite' => $apartmentorsuite,
- 'city' => $city,
- 'state' => $state,
- 'postalcode' => $postalcode,
- 'phone' => $phone,
- 'email' => $email,
- 'isresidential' => $isresidential,
- 'quantity' => $quantity,
- 'shippingchoice' => $shippingchoice,
- 'paymentmethod' => $paymentmethod,
- 'ccnumber' => $ccnumber,
- 'ccname' => $ccname,
- 'ccpostalcode' => $ccpostalcode,
- 'cctype' => $cctype,
- 'ccexpirationmonth' => $ccexpirationmonth,
- 'ccexpirationyear' => $ccexpirationyear,
- 'format' => $format,
- 'environment' => $environment
- ));
- curl_setopt($curl_handle,CURLOPT_SSL_VERIFYPEER,0);
- curl_setopt($curl_handle,CURLOPT_CAINFO,'[path to crt]/ca-bundle.crt'); // Make sure and get a ca-bundle.crt and use to verify peer
- $buffer = curl_exec($curl_handle);
- curl_close($curl_handle);
- var_dump($buffer);
- //$result = json_decode($buffer);
- ?>