prismpay 0.0.6 → 0.0.7

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.
@@ -166,15 +166,15 @@ module PrismPay
166
166
  ############################################################
167
167
  # ext_ach_void doesn't work in generic testing accounts
168
168
  ############################################################
169
- # def ext_ach_void(identification, pp_txn_id, options = {})
170
- # response = @client.request :process_ext_ach_void do
171
- # http.auth.ssl.verify_mode = :none
172
- # soap.body &build_ext_ach_refund_void(nil, identification,
173
- # pp_txn_id, options)
174
- # end
169
+ def ext_ach_void(identification, pp_txn_id, options = {})
170
+ response = @client.request :process_ext_ach_void do
171
+ http.auth.ssl.verify_mode = :none
172
+ soap.body &build_ext_ach_refund_void(nil, identification,
173
+ pp_txn_id, options)
174
+ end
175
175
 
176
- # PrismCreditResponse.new(response)
177
- # end
176
+ PrismCreditResponse.new(response)
177
+ end
178
178
 
179
179
  def ext_ach_refund(amount, identification, pp_txn_id, options = {})
180
180
  response = @client.request :process_ext_ach_credit do
@@ -0,0 +1,311 @@
1
+ require 'savon'
2
+ require 'activemerchant'
3
+ require 'prism_credit_response'
4
+ require 'webpay'
5
+ require 'builder'
6
+ require 'openssl'
7
+
8
+ module PrismPay
9
+
10
+ class PrismPayReports
11
+ # this class will manage the connection to the gateway and handle
12
+ # transactions
13
+
14
+ WSDL = File.expand_path("../ReportingService.xml", __FILE__)
15
+ # WSDL = "https://trans.myprismpay.com/report/services/ReportingServices?wsdl"
16
+
17
+
18
+ TRANS_TYPES = ["ccpreauths", "ccpostauthsales", "ccvoids",
19
+ "ccrefunds", "ccchargebacks", "achpreauths",
20
+ "achsettlements", "achreturns", "achnocs",
21
+ "achvoids",
22
+ "achcreditsauth","achcreditsmerchantdebit",
23
+ "achcreditsdebitreturn",
24
+ "achcreditsmerchantsettle",
25
+ "achcreditspaymentsettle", "achcreditsreturn",
26
+ "debitsales", "debitrefunds", "achlatereturns",
27
+ "extachpreauths", "extachsettlements",
28
+ "extachreturns", "extachnocs", "extachvoids",
29
+ "extachcreditsauth", "extachcreditssettle",
30
+ "extachcreditsreturn", "extachck", "extachck",
31
+ "extachck", "verfication", "ccincremental",
32
+ "ccreversal"]
33
+
34
+
35
+ CARD_TYPES = ["visa", "mastercard", "amex", "discovernetwork",
36
+ "jcb", "diners", "debit", "flyingj", "cfna",
37
+ "gemoney", "fleetone", "fuellnk", "fuelman",
38
+ "mastercardfleet", "visafleet", "voyager",
39
+ "wrightexpress"]
40
+
41
+
42
+ PYDMO_KEY = '7974346A366450744C624A54715A39644A584E4469626246'
43
+
44
+
45
+ attr_accessor :acctid, :password
46
+ attr_reader :client
47
+
48
+
49
+ def initialize(options = {})
50
+
51
+ merchant_info = options
52
+
53
+ merchant_info.merge!({:login => 'TEST0'}) unless merchant_info[:login]
54
+
55
+ @login = merchant_info[:login]
56
+
57
+ # merchant_info.merge!({:start_date => start_Date}) unless merchant_info[:start_date]
58
+ # merchant_info.merge!({:end_date => end_date}) unless merchant_info[:end_date]
59
+
60
+ # TODO this is the key for PYDMO, needs to be read in from a file
61
+ @key = hexstr_to_str(PYDMO_KEY)
62
+
63
+ @client = Savon::Client.new(WSDL) # initialize savon client
64
+ end
65
+
66
+
67
+ def account_key
68
+ #needs to return the account key when we have it
69
+ "2D0BB3547DCCE429"
70
+ end
71
+
72
+
73
+ def ampm_hour(hour)
74
+ hour %= 12
75
+ return 12 if hour == 0
76
+ hour
77
+ end
78
+
79
+
80
+ def get_transactions(start_date, end_date, options = {})
81
+
82
+ #variables to handle return max of sample sets
83
+ max_rows = (options[:max_rows]) ? options[:max_rows] : 4096
84
+ num_rows = (options[:num_rows]) ? options[:num_rows] : max_rows
85
+ start_row = (options[:start_row]) ? options[:start_row] : 1
86
+
87
+ # set up the flags to initially include everything
88
+ accepted = declined = childsubids = initial_flag =
89
+ recurring_flag = recurringretries = sort = 1
90
+
91
+ accepted = 0 if options[:not_accepted]
92
+ declined = 0 if options[:not_declined]
93
+ childsubids = 0 if options[:no_childsubids]
94
+ initial_flag = 0 if options[:no_initials]
95
+ recurring_flag = 0 if options[:no_recurrings]
96
+ recurringretries = 0 if options[:no_recurring_retries]
97
+ sort = 0 if options[:no_sort]
98
+
99
+ # sets the test flag acceptable values are:
100
+ # 0 = Include Live and Test Transactions.
101
+ # 1 = Include Live Transactions Only.
102
+ # 2 = Include Test Transactions Only.
103
+ if options[:test_only] == true
104
+ test_flag = 2
105
+ elsif options[:test_only] == false
106
+ test_flag = 1
107
+ else
108
+ test_flag = 0
109
+ end
110
+
111
+ # sets the recurring_only flag... it overrides all others if true
112
+ options[:recurring_only] ? recurring_only = 1 : recurring_only = 0
113
+
114
+
115
+ if options[:card_types]
116
+ card_types = options[:card_types]
117
+ else
118
+ card_types = CARD_TYPES
119
+ end
120
+
121
+ if options[:trans_types]
122
+ transaction_types = options[:trans_types]
123
+ else
124
+ transaction_types = TRANS_TYPES
125
+ end
126
+
127
+
128
+ response = @client.request "TransactionReportInfo" do
129
+ http.auth.ssl.verify_mode = :none
130
+ soap.body do |xml|
131
+
132
+ xml.accountkey account_key
133
+ xml.sessionkey create_sessionkey
134
+ xml.subid options[:subid]
135
+
136
+ xml.startdate { |ixml|
137
+ ixml.month "%.2d" % start_date.mon
138
+ ixml.day "%.2d" % start_date.day
139
+ ixml.year start_date.year
140
+ ixml.hour "%.2d" % ampm_hour(start_date.hour)
141
+ ixml.minute "%.2d" % start_date.mon
142
+ ixml.second "%.2d" % start_date.sec
143
+ ixml.ampm((start_date.hour > 11) ? "PM" : "AM" )
144
+ }
145
+
146
+ xml.enddate { |ixml|
147
+ ixml.month "%.2d" % end_date.mon
148
+ ixml.day "%.2d" % end_date.day
149
+ ixml.year end_date.year
150
+ ixml.hour "%.2d" % ampm_hour(end_date.hour)
151
+ ixml.minute "%.2d" % end_date.mon
152
+ ixml.second "%.2d" % end_date.sec
153
+ ixml.ampm((end_date.hour > 11) ? "PM" : "AM" )
154
+ }
155
+
156
+ xml.cardtypes { |ixml|
157
+ ixml.visa(card_types.include?("visa") ? 1 : 0)
158
+ ixml.mastercard(card_types.include?("mastercard") ? 1 : 0)
159
+ ixml.amex(card_types.include?("amex") ? 1 : 0)
160
+ ixml.discovernetwork(card_types.include?("discovernetwork") ? 1 : 0)
161
+ ixml.jcb(card_types.include?("jcb") ? 1 : 0)
162
+ ixml.diners(card_types.include?("diners") ? 1 : 0)
163
+ ixml.debit(card_types.include?("debit") ? 1 : 0)
164
+ ixml.flyingj(card_types.include?("flyingj") ? 1 : 0)
165
+ ixml.cfna(card_types.include?("cfna") ? 1 : 0)
166
+ ixml.gemoney(card_types.include?("gemoney") ? 1 : 0)
167
+ ixml.fleetone(card_types.include?("fleetone") ? 1 : 0)
168
+ ixml.fuellnk(card_types.include?("fuellnk") ? 1 : 0)
169
+ ixml.fuelman(card_types.include?("fuelman") ? 1 : 0)
170
+ ixml.mastercardfleet(card_types.include?("mastercardfleet") ? 1 : 0)
171
+ ixml.visafleet(card_types.include?("visafleet") ? 1 : 0)
172
+ ixml.voyager(card_types.include?("voyager") ? 1 : 0)
173
+ ixml.wrightexpress(card_types.include?("wrightexpress") ? 1 : 0)
174
+ }
175
+
176
+ xml.transactiontypes { |ixml|
177
+ ixml.ccpreauths(transaction_types.include?("ccpreauths") ? 1 : 0)
178
+ ixml.ccpostauthsales(transaction_types.include?("ccpostauthsales") ? 1 : 0)
179
+ ixml.ccvoids(transaction_types.include?("ccvoids") ? 1 : 0)
180
+ ixml.ccrefunds(transaction_types.include?("ccrefunds") ? 1 : 0)
181
+ ixml.ccchargebacks(transaction_types.include?("ccchargebacks") ? 1 : 0)
182
+ ixml.achpreauths(transaction_types.include?("achpreauths") ? 1 : 0)
183
+ ixml.achsettlements(transaction_types.include?("achsettlements") ? 1 : 0)
184
+ ixml.achreturns(transaction_types.include?("achreturns") ? 1 : 0)
185
+ ixml.achnocs(transaction_types.include?("achnocs") ? 1 : 0)
186
+ ixml.achvoids(transaction_types.include?("achvoids") ? 1 : 0)
187
+ ixml.achcreditsauth(transaction_types.include?("achcreditsauth") ? 1 : 0)
188
+ ixml.achcreditsmerchantdebit(transaction_types.include?("achcreditsmerchantdebit") ? 1 : 0)
189
+ ixml.achcreditsdebitreturn(transaction_types.include?("achcreditsdebitreturn") ? 1 : 0)
190
+ ixml.achcreditsmerchantsettle(transaction_types.include?("achcreditsmerchantsettle") ? 1 : 0)
191
+ ixml.achcreditspaymentsettle(transaction_types.include?("achcreditspaymentsettle") ? 1 : 0)
192
+ ixml.achcreditsreturn(transaction_types.include?("achcreditsreturn") ? 1 : 0)
193
+ ixml.debitsales(transaction_types.include?("debitsales") ? 1 : 0)
194
+ ixml.debitrefunds(transaction_types.include?("debitrefunds") ? 1 : 0)
195
+ ixml.achlatereturns(transaction_types.include?("achlatereturns") ? 1 : 0)
196
+ ixml.extachpreauths(transaction_types.include?("extachpreauths") ? 1 : 0)
197
+ ixml.extachsettlements(transaction_types.include?("extachsettlements") ? 1 : 0)
198
+ ixml.extachreturns(transaction_types.include?("extachreturns") ? 1 : 0)
199
+ ixml.extachnocs(transaction_types.include?("extachnocs") ? 1 : 0)
200
+ ixml.extachvoids(transaction_types.include?("extachvoids") ? 1 : 0)
201
+ ixml.extachcreditsauth(transaction_types.include?("extachcreditsauth") ? 1 : 0)
202
+ ixml.extachcreditssettle(transaction_types.include?("extachcreditssettle") ? 1 : 0)
203
+ ixml.extachcreditsreturn(transaction_types.include?("extachcreditsreturn") ? 1 : 0)
204
+ ixml.extachck21_auth(transaction_types.include?("extachck21_auth") ? 1 : 0)
205
+ ixml.extachck21_void(transaction_types.include?("extachck21_void") ? 1 : 0)
206
+ ixml.extachck21_return(transaction_types.include?("extachck21_return") ? 1 : 0)
207
+ ixml.verfication(transaction_types.include?("verfication") ? 1 : 0)
208
+ ixml.ccincremental(transaction_types.include?("ccincremental") ? 1 : 0)
209
+ ixml.ccreversal(transaction_types.include?("ccreversal") ? 1 : 0)
210
+ }
211
+
212
+ xml.limitbycard((card_types == CARD_TYPES) ? 0 : 1 )
213
+ xml.limitbytranstypes((transaction_types == TRANS_TYPES) ? 0 : 1)
214
+ xml.childsubids(childsubids)
215
+ xml.accepted(accepted)
216
+ xml.declined(declined)
217
+ xml.test(test_flag)
218
+ xml.initial(initial_flag)
219
+ xml.recurring(recurring_flag)
220
+ xml.recurringonly(recurring_only)
221
+ xml.recurringretries (recurringretries)
222
+ xml.sort(sort)
223
+ xml.maxrows max_rows
224
+ xml.startrow start_row
225
+ xml.numrows num_rows
226
+ xml.currency('')
227
+ end
228
+ end
229
+ end
230
+
231
+
232
+ def create_sessionkey
233
+ # this needs to be of the form Acctid:UnixTime and then
234
+ # encrypted with @key
235
+
236
+ unix_time = Time.now.to_i
237
+ string = "#{@login}:#{unix_time}"
238
+
239
+ encrypt_string(string)
240
+ end
241
+
242
+
243
+ # openssl methods for encrypting
244
+
245
+ def decrypt_string(hexstr)
246
+ # maybe pass the need to convert from the hexstr
247
+ str = hexstr_to_str(hexstr)
248
+ retstr = ""
249
+ cipher = OpenSSL::Cipher.new('des-ede3')
250
+ cipher.decrypt
251
+ cipher.key = @key
252
+ retstr << cipher.update(str)
253
+ retstr << cipher.final
254
+ return retstr
255
+ end
256
+
257
+ def encrypt_string(str)
258
+ # returns the hexstr for the url
259
+ # TODO: need to uri escape the string before encrypting
260
+ retstr = ""
261
+ cipher = OpenSSL::Cipher.new("des-ede3")
262
+ cipher.encrypt
263
+ cipher.key = @key
264
+ retstr << cipher.update(str)
265
+ retstr << cipher.final
266
+ retstr = str_to_hexstr(retstr)
267
+ return retstr
268
+ end
269
+
270
+ def str_to_hexstr(hexstr)
271
+ hexstr.unpack('H*').first
272
+ end
273
+
274
+
275
+ def hexstr_to_str(str)
276
+ [str].pack 'H*'
277
+ end
278
+ end #PrismPayReports
279
+
280
+
281
+ class ReportResults
282
+ attr_reader :transactions
283
+
284
+ def initialize(soap_result)
285
+ @transactions = soap_result[:transaction_report_result][:transaction_report_details][:results][:record]
286
+ end
287
+ end #ReportRexults
288
+
289
+
290
+ end #module PrismPay
291
+
292
+
293
+
294
+ ############################################################
295
+ # To write a test or sample driver you would need to do the following
296
+ ############################################################
297
+ # pp_report = PrismPay::PrismPayReports.new({:login => 'PYDMO'})
298
+ #
299
+ # ## uses 5 days ago as start_date and now as end_date
300
+ # result = pp_report.get_transactions(Time.now - (60*60*24*5), Time.now)
301
+ # what is returned in result is what we now need to parse
302
+ ############################################################
303
+
304
+
305
+ #####################################
306
+ # the resulting set is returned as an array that can be accessed
307
+ # through this variable:
308
+ #
309
+ # result.body[:transaction_report_result][:transaction_report_details][:results][:record]
310
+ #
311
+
@@ -0,0 +1,12 @@
1
+ The previous extachsale call and response:
2
+
3
+
4
+
5
+
6
+
7
+ The extachvoid call and response:
8
+
9
+ D, [2012-05-31T17:38:19.087895 #11382] DEBUG -- : <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="https://trans.myprismpay.com/MPWeb/services/TransactionService" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="urn:MPTransProcess"><env:Body><processExtACHVoid><ckinfo xsi:type="urn:ACHInfo"><acctid>TEST0</acctid><orderid>232553638</orderid><historyid>1.22</historyid><ipaddress/></ckinfo></processExtACHVoid></env:Body></env:Envelope>
10
+ D, [2012-05-31T17:38:19.087943 #11382] DEBUG -- : HTTPI executes HTTP POST using the net_http adapter
11
+ D, [2012-05-31T17:38:20.470828 #11382] DEBUG -- : SOAP response (status 200):
12
+ D, [2012-05-31T17:38:20.471119 #11382] DEBUG -- : <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><processExtACHVoidResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><processExtACHVoidReturn href="#id0"/></processExtACHVoidResponse><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns1:ProcessResult" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:MPTransProcess"><status xsi:type="xsd:string">Declined</status><result xsi:type="xsd:string">DECLINED:1100070009:Transaction does not belong to current merchant - denied:</result><historyid xsi:type="xsd:string">0</historyid><orderid xsi:type="xsd:string">0</orderid><refcode xsi:type="xsd:string"></refcode><authcode xsi:type="xsd:string">DECLINED:1100070009:Transaction does not belong to current merchant - denied:</authcode><total xsi:type="xsd:float">0.0</total><merchantordernumber xsi:type="xsd:string"></merchantordernumber><transdate xsi:type="xsd:dateTime">2012-05-31T21:36:06.670Z</transdate><paytype xsi:type="xsd:string"></paytype><duplicate xsi:type="xsd:int">0</duplicate></multiRef></soapenv:Body></soapenv:Envelope>
@@ -0,0 +1,50 @@
1
+ D, [2012-05-31T17:38:14.680755 #11382] DEBUG -- : SOAP request: https://trans.myprismpay.com/MPWeb/services/TransactionService
2
+ D, [2012-05-31T17:38:14.680870 #11382] DEBUG -- : SOAPAction: "processExtACHSale", Content-Type: text/xml;charset=UTF-8, Content-Length: 661
3
+ D, [2012-05-31T17:38:14.680932 #11382] DEBUG -- : <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="https://trans.myprismpay.com/MPWeb/services/TransactionService" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="urn:MPTransProcess"><env:Body><processExtACHSale><ckinfo xsi:type="urn:ACHInfo"><acctid>TEST0</acctid><ckname>George Jones</ckname><ckaba>9999999999</ckaba><ckacct>9999999999</ckacct><amount>1.22</amount><cktype>PPD</cktype><ckaccttypedesc>personal checking</ckaccttypedesc><companyname></companyname><ipaddress/></ckinfo></processExtACHSale></env:Body></env:Envelope>
4
+ D, [2012-05-31T17:38:14.744394 #11382] DEBUG -- : HTTPI executes HTTP POST using the net_http adapter
5
+ D, [2012-05-31T17:38:16.276318 #11382] DEBUG -- : SOAP response (status 200):
6
+ D, [2012-05-31T17:38:16.276510 #11382] DEBUG -- : <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><processExtACHSaleResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><processExtACHSaleReturn href="#id0"/></processExtACHSaleResponse><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns1:ProcessResult" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:MPTransProcess"><status xsi:type="xsd:string">Approved</status><result xsi:type="xsd:string">EXTACH:TEST:::232553638:::</result><historyid xsi:type="xsd:string">232553638</historyid><orderid xsi:type="xsd:string">168355524</orderid><refcode xsi:type="xsd:string">GETI</refcode><authcode xsi:type="xsd:string">EXTACH:TEST:::232553638:::</authcode><total xsi:type="xsd:float">1.22</total><merchantordernumber xsi:type="xsd:string"></merchantordernumber><transdate xsi:type="xsd:dateTime">2012-05-31T21:38:19.000Z</transdate><paytype xsi:type="xsd:string">Check</paytype><duplicate xsi:type="xsd:int">0</duplicate></multiRef></soapenv:Body></soapenv:Envelope>
7
+ D, [2012-05-31T17:38:16.329452 #11382] DEBUG -- : SOAP request: https://trans.myprismpay.com/MPWeb/services/TransactionService
8
+ D, [2012-05-31T17:38:16.329537 #11382] DEBUG -- : SOAPAction: "processExtACHSale", Content-Type: text/xml;charset=UTF-8, Content-Length: 661
9
+ D, [2012-05-31T17:38:16.329570 #11382] DEBUG -- : <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="https://trans.myprismpay.com/MPWeb/services/TransactionService" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="urn:MPTransProcess"><env:Body><processExtACHSale><ckinfo xsi:type="urn:ACHInfo"><acctid>TEST0</acctid><ckname>George Jones</ckname><ckaba>9999999999</ckaba><ckacct>9999999999</ckacct><amount>1.22</amount><cktype>PPD</cktype><ckaccttypedesc>personal checking</ckaccttypedesc><companyname></companyname><ipaddress/></ckinfo></processExtACHSale></env:Body></env:Envelope>
10
+ D, [2012-05-31T17:38:16.329618 #11382] DEBUG -- : HTTPI executes HTTP POST using the net_http adapter
11
+ D, [2012-05-31T17:38:17.652547 #11382] DEBUG -- : SOAP response (status 200):
12
+ D, [2012-05-31T17:38:17.652834 #11382] DEBUG -- : <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><processExtACHSaleResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><processExtACHSaleReturn href="#id0"/></processExtACHSaleResponse><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns1:ProcessResult" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:MPTransProcess"><status xsi:type="xsd:string">Approved</status><result xsi:type="xsd:string">EXTACH:TEST:::232553638:::</result><historyid xsi:type="xsd:string">232553638</historyid><orderid xsi:type="xsd:string">168355524</orderid><refcode xsi:type="xsd:string">GETI</refcode><authcode xsi:type="xsd:string">EXTACH:TEST:::232553638:::</authcode><total xsi:type="xsd:float">1.22</total><merchantordernumber xsi:type="xsd:string"></merchantordernumber><transdate xsi:type="xsd:dateTime">2012-05-31T21:38:19.000Z</transdate><paytype xsi:type="xsd:string">Check</paytype><duplicate xsi:type="xsd:int">1</duplicate></multiRef></soapenv:Body></soapenv:Envelope>
13
+ .D, [2012-05-31T17:38:17.679327 #11382] DEBUG -- : SOAP request: https://trans.myprismpay.com/MPWeb/services/TransactionService
14
+ D, [2012-05-31T17:38:17.679432 #11382] DEBUG -- : SOAPAction: "processExtACHConsumerDisbursement", Content-Type: text/xml;charset=UTF-8, Content-Length: 693
15
+ D, [2012-05-31T17:38:17.679479 #11382] DEBUG -- : <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="https://trans.myprismpay.com/MPWeb/services/TransactionService" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="urn:MPTransProcess"><env:Body><processExtACHConsumerDisbursement><ckinfo xsi:type="urn:ACHInfo"><acctid>TEST0</acctid><ckname>George Jones</ckname><ckaba>9999999999</ckaba><ckacct>9999999999</ckacct><amount>1.22</amount><cktype>PPD</cktype><ckaccttypedesc>personal checking</ckaccttypedesc><companyname></companyname><ipaddress/></ckinfo></processExtACHConsumerDisbursement></env:Body></env:Envelope>
16
+ D, [2012-05-31T17:38:17.679676 #11382] DEBUG -- : HTTPI executes HTTP POST using the net_http adapter
17
+ D, [2012-05-31T17:38:19.066572 #11382] DEBUG -- : SOAP response (status 200):
18
+ D, [2012-05-31T17:38:19.066763 #11382] DEBUG -- : <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><processExtACHConsumerDisbursementResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><processExtACHConsumerDisbursementReturn href="#id0"/></processExtACHConsumerDisbursementResponse><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns1:ProcessResult" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:MPTransProcess"><status xsi:type="xsd:string">Approved</status><result xsi:type="xsd:string">EXTACHCREDIT:TEST:::232553610:::</result><historyid xsi:type="xsd:string">232553610</historyid><orderid xsi:type="xsd:string">168355704</orderid><refcode xsi:type="xsd:string">GETI</refcode><authcode xsi:type="xsd:string">EXTACHCREDIT:TEST:::232553610:::</authcode><total xsi:type="xsd:float">1.22</total><merchantordernumber xsi:type="xsd:string"></merchantordernumber><transdate xsi:type="xsd:dateTime">2012-05-31T21:38:21.000Z</transdate><paytype xsi:type="xsd:string">Check</paytype><duplicate xsi:type="xsd:int">0</duplicate></multiRef></soapenv:Body></soapenv:Envelope>
19
+ .D, [2012-05-31T17:38:19.087772 #11382] DEBUG -- : SOAP request: https://trans.myprismpay.com/MPWeb/services/TransactionService
20
+ D, [2012-05-31T17:38:19.087858 #11382] DEBUG -- : SOAPAction: "processExtACHVoid", Content-Type: text/xml;charset=UTF-8, Content-Length: 517
21
+ D, [2012-05-31T17:38:19.087895 #11382] DEBUG -- : <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="https://trans.myprismpay.com/MPWeb/services/TransactionService" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="urn:MPTransProcess"><env:Body><processExtACHVoid><ckinfo xsi:type="urn:ACHInfo"><acctid>TEST0</acctid><orderid>232553638</orderid><historyid>1.22</historyid><ipaddress/></ckinfo></processExtACHVoid></env:Body></env:Envelope>
22
+ D, [2012-05-31T17:38:19.087943 #11382] DEBUG -- : HTTPI executes HTTP POST using the net_http adapter
23
+ D, [2012-05-31T17:38:20.470828 #11382] DEBUG -- : SOAP response (status 200):
24
+ D, [2012-05-31T17:38:20.471119 #11382] DEBUG -- : <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><processExtACHVoidResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><processExtACHVoidReturn href="#id0"/></processExtACHVoidResponse><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns1:ProcessResult" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:MPTransProcess"><status xsi:type="xsd:string">Declined</status><result xsi:type="xsd:string">DECLINED:1100070009:Transaction does not belong to current merchant - denied:</result><historyid xsi:type="xsd:string">0</historyid><orderid xsi:type="xsd:string">0</orderid><refcode xsi:type="xsd:string"></refcode><authcode xsi:type="xsd:string">DECLINED:1100070009:Transaction does not belong to current merchant - denied:</authcode><total xsi:type="xsd:float">0.0</total><merchantordernumber xsi:type="xsd:string"></merchantordernumber><transdate xsi:type="xsd:dateTime">2012-05-31T21:36:06.670Z</transdate><paytype xsi:type="xsd:string"></paytype><duplicate xsi:type="xsd:int">0</duplicate></multiRef></soapenv:Body></soapenv:Envelope>
25
+ FD, [2012-05-31T17:38:20.500195 #11382] DEBUG -- : SOAP request: https://trans.myprismpay.com/MPWeb/services/TransactionService
26
+ D, [2012-05-31T17:38:20.500457 #11382] DEBUG -- : SOAPAction: "processExtACHCredit", Content-Type: text/xml;charset=UTF-8, Content-Length: 547
27
+ D, [2012-05-31T17:38:20.500586 #11382] DEBUG -- : <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="https://trans.myprismpay.com/MPWeb/services/TransactionService" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="urn:MPTransProcess"><env:Body><processExtACHCredit><ckinfo xsi:type="urn:ACHInfo"><acctid>TEST0</acctid><orderid>168355524</orderid><historyid>232553638</historyid><amount>1.22</amount><ipaddress/></ckinfo></processExtACHCredit></env:Body></env:Envelope>
28
+ D, [2012-05-31T17:38:20.500749 #11382] DEBUG -- : HTTPI executes HTTP POST using the net_http adapter
29
+ D, [2012-05-31T17:38:21.904115 #11382] DEBUG -- : SOAP response (status 200):
30
+ D, [2012-05-31T17:38:21.904380 #11382] DEBUG -- : <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><processExtACHCreditResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><processExtACHCreditReturn href="#id0"/></processExtACHCreditResponse><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns1:ProcessResult" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:MPTransProcess"><status xsi:type="xsd:string">Approved</status><result xsi:type="xsd:string">EXTACHREFUND:TEST:::232553627:::</result><historyid xsi:type="xsd:string">232553627</historyid><orderid xsi:type="xsd:string">168355524</orderid><refcode xsi:type="xsd:string">GETI</refcode><authcode xsi:type="xsd:string">EXTACHREFUND:TEST:::232553627:::</authcode><total xsi:type="xsd:float">1.22</total><merchantordernumber xsi:type="xsd:string"></merchantordernumber><transdate xsi:type="xsd:dateTime">2012-05-31T21:38:24.000Z</transdate><paytype xsi:type="xsd:string">Check</paytype><duplicate xsi:type="xsd:int">0</duplicate></multiRef></soapenv:Body></soapenv:Envelope>
31
+ .
32
+
33
+ Failures:
34
+
35
+ 1) PrismPay::PrismPay ext_ach_sale should void a previous transaction
36
+ Failure/Error: response.body[:multi_ref][:status].should =~ /Approved/
37
+ expected: /Approved/
38
+ got: "Declined" (using =~)
39
+ Diff:
40
+ @@ -1,2 +1,2 @@
41
+ -/Approved/
42
+ +"Declined"
43
+ # ./spec/prismpay_spec.rb:411:in `block (2 levels) in <top (required)>'
44
+
45
+ Finished in 7.26 seconds
46
+ 4 examples, 1 failure
47
+
48
+ Failed examples:
49
+
50
+ rspec ./spec/prismpay_spec.rb:403 # PrismPay::PrismPay ext_ach_sale should v
@@ -0,0 +1,8 @@
1
+ describe PrismPay::PrismPayReports do
2
+ describe "#get_selections" do
3
+
4
+ end
5
+
6
+ describe "" do
7
+
8
+ end
@@ -407,7 +407,7 @@ describe PrismPay::PrismPay, "ext_ach_sale", :bfd => true do
407
407
  authcode = values[:historyid]
408
408
  amount = values[:amount]
409
409
 
410
- response = gateway.ext_ach_void(amount, authcode, orderid).soap_response
410
+ response = gateway.ext_ach_void(authcode, orderid).soap_response
411
411
  response.body[:multi_ref][:status].should =~ /Approved/
412
412
 
413
413
  if response.body[:multi_ref][:status] =~ /Approved/
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prismpay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
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-02-27 00:00:00.000000000 Z
12
+ date: 2012-06-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemerchant
@@ -55,12 +55,12 @@ files:
55
55
  - lib/prismpay_am.rb
56
56
  - lib/webpay.rb
57
57
  - README.md
58
- - spec/prism_credit_response_spec.rb~
59
- - spec/prismpay_response_spec.rb~
58
+ - lib/prismpay_reports.rb
59
+ - spec/file~
60
60
  - spec/webpay_spec.rb
61
61
  - spec/prism_credit_response_spec.rb
62
- - spec/webpay_spec.rb~
63
- - spec/prismpay_spec.rb~
62
+ - spec/junk~
63
+ - spec/prismpay_reports_spec.rb
64
64
  - spec/prismpay_spec.rb
65
65
  homepage:
66
66
  licenses: []
@@ -82,15 +82,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  version: '0'
83
83
  requirements: []
84
84
  rubyforge_project:
85
- rubygems_version: 1.8.19
85
+ rubygems_version: 1.8.24
86
86
  signing_key:
87
87
  specification_version: 3
88
88
  summary: Provide an interface to the Prismpay Gateway
89
89
  test_files:
90
- - spec/prism_credit_response_spec.rb~
91
- - spec/prismpay_response_spec.rb~
90
+ - spec/file~
92
91
  - spec/webpay_spec.rb
93
92
  - spec/prism_credit_response_spec.rb
94
- - spec/webpay_spec.rb~
95
- - spec/prismpay_spec.rb~
93
+ - spec/junk~
94
+ - spec/prismpay_reports_spec.rb
96
95
  - spec/prismpay_spec.rb
@@ -1,4 +0,0 @@
1
- require "prismpay"
2
-
3
- describe PrismPayResponse, "" do
4
- end
@@ -1,2 +0,0 @@
1
- require "prismpay"
2
-
@@ -1,2 +0,0 @@
1
- require 'prismpay'
2
-
@@ -1,10 +0,0 @@
1
- require 'prismpay'
2
- require 'webpay'
3
-
4
- describe Webpay "This is the planned class we'll see what happens" do
5
- end
6
-
7
- describe Webpay do
8
- it "converts hexstr to their hexvals" do
9
- end
10
- end