vcx-elements 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/gem-create.gemspec +1 -1
  2. data/lib/elements.rb +2 -23
  3. metadata +2 -2
data/gem-create.gemspec CHANGED
@@ -3,7 +3,7 @@ $:.unshift 'lib'
3
3
  Gem::Specification.new do |s|
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.name = "vcx-elements"
6
- s.version = "0.2.1"
6
+ s.version = "0.2.2"
7
7
  s.date = Time.now.strftime('%Y-%m-%d')
8
8
  s.homepage = "https://github.com/livegamervcxdevteam/elementsapi.git"
9
9
  s.authors = ["livegamer"]
data/lib/elements.rb CHANGED
@@ -104,27 +104,6 @@ module Elements
104
104
  post_data("forexOffer", params)
105
105
  end
106
106
 
107
- #def self.create_cashin_po(order, ipaddress='1.1.1.1')
108
- #class << order
109
- #attr_accessor :cashin_forex_elements_id, :cashin_config_id
110
- #end
111
-
112
- #Configurable Elements Ids
113
- #order.cashin_forex_elements_id = '1850'
114
- #order.cashin_config_id = '1347'
115
-
116
- #lineItem, payment = cashin_purchase_info(order, ipaddress)
117
-
118
- #params = {
119
- #orderCommand: 'AUTHORIZE',
120
- #buyerUser: {'@id' => order.user.elements_id},
121
- #lineItems: lineItem,
122
- #payment: payment
123
- #}
124
- #rs = XmlSimple.xml_in post_xml_data("purchaseOrder", params,"purchaseOrder")
125
- #rs['id']
126
- #end
127
-
128
107
  #Create purchase order is a class method that creates a new purchaseOrder in the elements system depending on the order type
129
108
  def self.create_purchase_order( order, ipaddress='1.1.1.1' )
130
109
  lineItems, payment = send("#{order.order_type}_purchase_info", order, ipaddress)
@@ -194,8 +173,8 @@ module Elements
194
173
  'billToStreetAddress' => payment_profile.billing_address1 + payment_profile.billing_address2,
195
174
  'billToZipCode' => payment_profile.zipcode,
196
175
  'creditCardNumber' => payment_profile.account_number,
197
- 'creditCardType' => payment_profile.account_type,
198
- 'expDate' => payment_profile.expiration_date, #To be fixed
176
+ 'creditCardType' => payment_profile.account_type.upcase,
177
+ 'expDate' => payment_profile.expiration_date.gsub('/',''), #To be fixed
199
178
  'securityCode' => payment_profile.ccv,
200
179
  'firstname' => payment_profile.name.split[0],
201
180
  'surname' => payment_profile.name.split[1],
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vcx-elements
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-07 00:00:00.000000000 Z
12
+ date: 2012-09-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake