Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
integration:ruby:xml_decode [2010/11/23 22:26] – [Gotchas] 199.19.145.179 | integration:ruby:xml_decode [2017/04/26 07:02] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 4: | Line 4: | ||
name : Datafeed Decryption Example | name : Datafeed Decryption Example | ||
description | description | ||
- | tags_tags | + | tags |
date_dt | date_dt | ||
version | version | ||
Line 12: | Line 12: | ||
====== Datafeed Decryption Example ====== | ====== Datafeed Decryption Example ====== | ||
+ | |||
+ | <WRAP important round> | ||
+ | //**Please note:**// | ||
+ | The code on this page is submitted by members of the FoxyCart community, and may not verified by FoxyCart.com LLC in any way, shape, or form. Please double check the code before installing. If you need help with it please [[http:// | ||
+ | </ | ||
+ | |||
===== Description ===== | ===== Description ===== | ||
A simple example of how to implement a datafeed listener in Ruby on Rails. It especially focuses on decrypting the RC4 encryption. | A simple example of how to implement a datafeed listener in Ruby on Rails. It especially focuses on decrypting the RC4 encryption. | ||
Line 20: | Line 26: | ||
===== Requirements ===== | ===== Requirements ===== | ||
- | * You must have [[http:// | + | * You must have [[https:// |
* You must have [[http:// | * You must have [[http:// | ||
* This example is for a v060 datafeed. It may have to be adapted for any other version. | * This example is for a v060 datafeed. It may have to be adapted for any other version. | ||
- | |||
===== Gotchas ===== | ===== Gotchas ===== | ||
* Be sure to use **CGI:: | * Be sure to use **CGI:: | ||
Line 38: | Line 43: | ||
def create | def create | ||
| | ||
- | require 'ruby/rc4' | + | require ' |
require ' | require ' | ||
| | ||
- | decryptor = RubyRc4.new(API_KEY) | + | decryptor = RC4.new(API_KEY) |
- | xml = decryptor.encrypt(CGI:: | + | xml = decryptor.decrypt(CGI:: |
| | ||
feed = Nokogiri:: | feed = Nokogiri:: |