HTTP Post in Canada Post Custom Shipping Type
Permalink
Hello,
It was suggested that I post this here in addition to the eCommerce Questions & Discussions section, sorry if there is an even better place than "Building in Concrete5" for this discussion:
I think us Canucks may be a few short steps away from having a Concrete5 shipping type. If anybody knows how I might set up an HTTP Post in a custom shipping type, the actual modifiers are calculated at canadapost.ca as per a registered SellOnline client's shipping profile.
What I need to do is post some product .xml data as per their .dtd (attached in .txt) and then receive a string of variables to display as options to the consumer. There is support on their end as well to help get this right, but I thought I would start here to see if somebody could help me get started. Here is a piece of code I found floating around on the web that somebody used to post data to SellOnline:
It was suggested that I post this here in addition to the eCommerce Questions & Discussions section, sorry if there is an even better place than "Building in Concrete5" for this discussion:
I think us Canucks may be a few short steps away from having a Concrete5 shipping type. If anybody knows how I might set up an HTTP Post in a custom shipping type, the actual modifiers are calculated at canadapost.ca as per a registered SellOnline client's shipping profile.
What I need to do is post some product .xml data as per their .dtd (attached in .txt) and then receive a string of variables to display as options to the consumer. There is support on their end as well to help get this right, but I thought I would start here to see if somebody could help me get started. Here is a piece of code I found floating around on the web that somebody used to post data to SellOnline:
//extract data from the post extract($_POST); //set POST variables $url = 'http://domain.com/get-post.php'; $fields = array( 'lname'=>urlencode($last_name), 'fname'=>urlencode($first_name), 'title'=>urlencode($title), 'company'=>urlencode($institution), 'age'=>urlencode($age), 'email'=>urlencode($email), 'phone'=>urlencode($phone) ); //url-ify the data for the POST foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
Viewing 15 lines of 50 lines. View entire code block.