global_collect 0.1.0

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 (90) hide show
  1. data/COPYING +11 -0
  2. data/README.markdown +109 -0
  3. data/Rakefile +34 -0
  4. data/VERSION +1 -0
  5. data/examples/cancel_payment.rb +14 -0
  6. data/examples/convert_amount.rb +14 -0
  7. data/examples/get_order_status.rb +15 -0
  8. data/examples/insert_order_with_payment.rb +37 -0
  9. data/examples/process_challenged.rb +13 -0
  10. data/examples/set_payment.rb +23 -0
  11. data/examples/test_connection.rb +13 -0
  12. data/global_collect.gemspec +170 -0
  13. data/lib/global_collect/api_client.rb +71 -0
  14. data/lib/global_collect/builders/do_refund/credit_card_payment.rb +12 -0
  15. data/lib/global_collect/builders/do_refund/payment.rb +39 -0
  16. data/lib/global_collect/builders/insert_order_with_payment/credit_card_online_payment.rb +38 -0
  17. data/lib/global_collect/builders/insert_order_with_payment/hosted_credit_card_online_payment.rb +4 -0
  18. data/lib/global_collect/builders/insert_order_with_payment/order.rb +75 -0
  19. data/lib/global_collect/builders/insert_order_with_payment/payment.rb +25 -0
  20. data/lib/global_collect/builders/set_payment/payment.rb +23 -0
  21. data/lib/global_collect/const/payment_product.rb +38 -0
  22. data/lib/global_collect/const/payment_status.rb +90 -0
  23. data/lib/global_collect/field_validator.rb +47 -0
  24. data/lib/global_collect/request_models/base.rb +37 -0
  25. data/lib/global_collect/request_models/do_refund/credit_card_payment.rb +12 -0
  26. data/lib/global_collect/request_models/do_refund/payment.rb +39 -0
  27. data/lib/global_collect/request_models/insert_order_with_payment/credit_card_online_payment.rb +44 -0
  28. data/lib/global_collect/request_models/insert_order_with_payment/hosted_credit_card_online_payment.rb +19 -0
  29. data/lib/global_collect/request_models/insert_order_with_payment/order.rb +67 -0
  30. data/lib/global_collect/request_models/insert_order_with_payment/payment.rb +17 -0
  31. data/lib/global_collect/request_models/set_payment/payment.rb +17 -0
  32. data/lib/global_collect/requests/base.rb +43 -0
  33. data/lib/global_collect/requests/cancel_payment.rb +22 -0
  34. data/lib/global_collect/requests/composite.rb +23 -0
  35. data/lib/global_collect/requests/convert_amount.rb +29 -0
  36. data/lib/global_collect/requests/do_refund.rb +8 -0
  37. data/lib/global_collect/requests/get_order_status.rb +24 -0
  38. data/lib/global_collect/requests/insert_order_with_payment.rb +10 -0
  39. data/lib/global_collect/requests/process_challenged.rb +22 -0
  40. data/lib/global_collect/requests/set_payment.rb +9 -0
  41. data/lib/global_collect/requests/simple.rb +39 -0
  42. data/lib/global_collect/requests/test_connection.rb +8 -0
  43. data/lib/global_collect/responses/base.rb +73 -0
  44. data/lib/global_collect/responses/convert_amount/response_methods.rb +8 -0
  45. data/lib/global_collect/responses/do_refund/response_methods.rb +24 -0
  46. data/lib/global_collect/responses/get_order_status/v1_response_methods.rb +49 -0
  47. data/lib/global_collect/responses/get_order_status/v2_response_methods.rb +67 -0
  48. data/lib/global_collect/responses/insert_order_with_payment/credit_card_online_payment_response_methods.rb +31 -0
  49. data/lib/global_collect/responses/insert_order_with_payment/hosted_merchant_link_payment_response_methods.rb +16 -0
  50. data/lib/global_collect/responses/success_row.rb +15 -0
  51. data/lib/global_collect.rb +81 -0
  52. data/spec/api_client_spec.rb +93 -0
  53. data/spec/builders/do_refund/credit_card_payment_spec.rb +32 -0
  54. data/spec/builders/do_refund/payment_spec.rb +51 -0
  55. data/spec/builders/insert_order_with_payment/credit_card_online_payment_spec.rb +59 -0
  56. data/spec/builders/insert_order_with_payment/hosted_credit_card_online_payment_spec.rb +59 -0
  57. data/spec/builders/insert_order_with_payment/order_spec.rb +88 -0
  58. data/spec/builders/insert_order_with_payment/payment_spec.rb +37 -0
  59. data/spec/builders/set_payment/payment_spec.rb +35 -0
  60. data/spec/field_validator_spec.rb +79 -0
  61. data/spec/global_collect_spec.rb +43 -0
  62. data/spec/request_models/base_spec.rb +31 -0
  63. data/spec/request_models/insert_order_with_payment/credit_card_online_payment_spec.rb +11 -0
  64. data/spec/request_models/insert_order_with_payment/hosted_credit_card_online_payment_spec.rb +38 -0
  65. data/spec/requests/base_spec.rb +40 -0
  66. data/spec/requests/composite_spec.rb +48 -0
  67. data/spec/requests/convert_amount.rb +34 -0
  68. data/spec/requests/insert_order_with_payment_spec.rb +60 -0
  69. data/spec/requests/simple_spec.rb +37 -0
  70. data/spec/responses/base_spec.rb +59 -0
  71. data/spec/responses/convert_amount/response_methods_spec.rb +13 -0
  72. data/spec/responses/do_refund/response_methods_spec.rb +15 -0
  73. data/spec/responses/get_order_status/v1_response_methods_spec.rb +28 -0
  74. data/spec/responses/get_order_status/v2_response_methods_spec.rb +28 -0
  75. data/spec/responses/insert_order_with_payment/credit_card_online_payment_response_methods_spec.rb +13 -0
  76. data/spec/responses/insert_order_with_payment/hosted_merchant_link_payment_response_methods_spec.rb +13 -0
  77. data/spec/responses/succcess_row_spec.rb +26 -0
  78. data/spec/spec_helper.rb +130 -0
  79. data/spec/support/challenged_iowp_response.xml +51 -0
  80. data/spec/support/successful_convert_amount_response.xml +29 -0
  81. data/spec/support/successful_do_refund_response.xml +36 -0
  82. data/spec/support/successful_get_order_status_v1_response.xml +72 -0
  83. data/spec/support/successful_get_order_status_v2_response.xml +50 -0
  84. data/spec/support/successful_hosted_iowp_response.xml +60 -0
  85. data/spec/support/successful_iowp_response.xml +49 -0
  86. data/spec/support/successful_process_challenged_response.xml +26 -0
  87. data/spec/support/unsuccessful_do_refund_response.xml +29 -0
  88. data/spec/support/unsuccessful_iowp_response.xml +42 -0
  89. data/spec/support/unsuccessful_process_challenged_response.xml +30 -0
  90. metadata +213 -0
@@ -0,0 +1,28 @@
1
+ require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
2
+
3
+ describe "the v1 get order status response methods" do
4
+ before(:each) do
5
+ @response = load_canned_response('successful_get_order_status_v1_response.xml')
6
+ @response.extend(GlobalCollect::Responses::GetOrderStatus::V1ResponseMethods)
7
+ end
8
+
9
+ it "should give the statuses" do
10
+ @response.statuses.should_not be_nil
11
+ @response.statuses.size.should be(3)
12
+ @response.statuses.first.should_not be_nil
13
+ end
14
+
15
+ it "should have responses with helper accessor methods" do
16
+ @response.statuses.first.order_id.should == "19"
17
+ end
18
+
19
+ it "should have responses with status lookup methods" do
20
+ @response.statuses.first.payment_status.code.should be(100)
21
+ end
22
+
23
+ it "should have responses with error helper methods" do
24
+ @response.statuses.first.errors.should_not be_nil
25
+ @response.statuses.first.errors.size.should be(1)
26
+ @response.statuses.first.errors.first.code.should be(430330)
27
+ end
28
+ end
@@ -0,0 +1,28 @@
1
+ require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
2
+
3
+ describe "the v2 get order status response methods" do
4
+ before(:each) do
5
+ @response = load_canned_response('successful_get_order_status_v2_response.xml')
6
+ @response.extend(GlobalCollect::Responses::GetOrderStatus::V2ResponseMethods)
7
+ end
8
+
9
+ it "should give the statuses" do
10
+ @response.statuses.should_not be_nil
11
+ @response.statuses.size.should be(1)
12
+ @response.statuses.first.should_not be_nil
13
+ end
14
+
15
+ it "should have responses with helper accessor methods" do
16
+ @response.statuses.first.order_id.should == "53"
17
+ end
18
+
19
+ it "should have responses with status lookup methods" do
20
+ @response.statuses.first.payment_status.code.should be(100)
21
+ end
22
+
23
+ it "should have responses with error helper methods" do
24
+ @response.statuses.first.errors.should_not be_nil
25
+ @response.statuses.first.errors.size.should be(2)
26
+ @response.statuses.first.errors.first.code.should be(20001000)
27
+ end
28
+ end
@@ -0,0 +1,13 @@
1
+ require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
2
+
3
+ describe "the credit card online payment response methods" do
4
+ before(:each) do
5
+ @response = load_canned_response('successful_iowp_response.xml')
6
+ @response.extend(GlobalCollect::Responses::SuccessRow)
7
+ @response.extend(GlobalCollect::Responses::InsertOrderWithPayment::CreditCardOnlinePaymentResponseMethods)
8
+ end
9
+
10
+ it "should see the methods" do
11
+ @response.order_id.should == "42"
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
2
+
3
+ describe "the hosted merchant link payment response methods" do
4
+ before(:each) do
5
+ @response = load_canned_response('successful_hosted_iowp_response.xml')
6
+ @response.extend(GlobalCollect::Responses::SuccessRow)
7
+ @response.extend(GlobalCollect::Responses::InsertOrderWithPayment::HostedMerchantLinkPaymentResponseMethods)
8
+ end
9
+
10
+ it "should see the methods" do
11
+ @response.form_method.should == "GET"
12
+ end
13
+ end
@@ -0,0 +1,26 @@
1
+ require File.join(File.dirname(__FILE__), '..', 'spec_helper')
2
+
3
+ describe "the base response" do
4
+ describe "on a successful response" do
5
+ before(:each) do
6
+ @response = load_canned_response('successful_iowp_response.xml')
7
+ end
8
+
9
+ it "should provide the success data hash" do
10
+ @response.extend(GlobalCollect::Responses::SuccessRow)
11
+ @response.row.should be_a Hash
12
+ @response.row.should_not be_blank
13
+ end
14
+ end
15
+
16
+ describe "on an unsuccessful response" do
17
+ before(:each) do
18
+ @response = load_canned_response('unsuccessful_iowp_response.xml')
19
+ end
20
+
21
+ it "should not provide the success data hash" do
22
+ @response.extend(GlobalCollect::Responses::SuccessRow)
23
+ @response.row.should be_nil
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,130 @@
1
+ require 'rubygems'
2
+
3
+ $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
4
+ require 'global_collect'
5
+ # initialiaze the logger and silence it for the tests
6
+ GlobalCollect.wire_logger.level = 4
7
+
8
+ require 'fakeweb'
9
+ FakeWeb.allow_net_connect = false
10
+
11
+ def read_canned_response(filename)
12
+ File.read(File.join(File.dirname(__FILE__), "support", filename))
13
+ end
14
+
15
+ def load_canned_response(filename)
16
+ contents = read_canned_response(filename)
17
+ GlobalCollect::Responses::Base.new(Crack::XML.parse(contents), contents)
18
+ end
19
+
20
+ require 'crack'
21
+
22
+
23
+ require 'rexml/document'
24
+ require 'rexml/element'
25
+
26
+ module Spec
27
+ module Matchers
28
+
29
+ # check if the xpath exists one or more times
30
+ class HaveXpath
31
+ def initialize(xpath)
32
+ @xpath = xpath
33
+ end
34
+
35
+ def matches?(response)
36
+ @response = response
37
+ doc = response.is_a?(REXML::Document) ? response : REXML::Document.new(@response)
38
+ match = REXML::XPath.match(doc, @xpath)
39
+ not match.empty?
40
+ end
41
+
42
+ def failure_message
43
+ "Did not find expected xpath #{@xpath}"
44
+ end
45
+
46
+ def negative_failure_message
47
+ "Did find unexpected xpath #{@xpath}"
48
+ end
49
+
50
+ def description
51
+ "match the xpath expression #{@xpath}"
52
+ end
53
+ end
54
+
55
+ def have_xpath(xpath)
56
+ HaveXpath.new(xpath)
57
+ end
58
+
59
+ # check if the xpath has the specified value
60
+ # value is a string and there must be a single result to match its
61
+ # equality against
62
+ class MatchXpath
63
+ def initialize(xpath, val)
64
+ @xpath = xpath
65
+ @val= val
66
+ end
67
+
68
+ def matches?(response)
69
+ @response = response
70
+ doc = response.is_a?(REXML::Document) ? response : REXML::Document.new(@response)
71
+ ok= true
72
+ REXML::XPath.each(doc, @xpath) do |e|
73
+ @actual_val= case e
74
+ when REXML::Attribute
75
+ e.to_s
76
+ when REXML::Element
77
+ e.text
78
+ else
79
+ e.to_s
80
+ end
81
+ return false unless @val == @actual_val
82
+ end
83
+ return ok
84
+ end
85
+
86
+ def failure_message
87
+ "The xpath #{@xpath} did not have the value '#{@val}'
88
+ It was '#{@actual_val}'"
89
+ end
90
+
91
+ def description
92
+ "match the xpath expression #{@xpath} with #{@val}"
93
+ end
94
+ end
95
+
96
+ def match_xpath(xpath, val)
97
+ MatchXpath.new(xpath, val)
98
+ end
99
+
100
+ # checks if the given xpath occurs num times
101
+ class HaveNodes #:nodoc:
102
+ def initialize(xpath, num)
103
+ @xpath= xpath
104
+ @num = num
105
+ end
106
+
107
+ def matches?(response)
108
+ @response = response
109
+ doc = response.is_a?(REXML::Document) ? response : REXML::Document.new(@response)
110
+ match = REXML::XPath.match(doc, @xpath)
111
+ @num_found= match.size
112
+ @num_found == @num
113
+ end
114
+
115
+ def failure_message
116
+ "Did not find expected number of nodes #{@num} in xpath #{@xpath}
117
+ Found #{@num_found}"
118
+ end
119
+
120
+ def description
121
+ "match the number of nodes #{@num}"
122
+ end
123
+ end
124
+
125
+ def have_nodes(xpath, num)
126
+ HaveNodes.new(xpath, num)
127
+ end
128
+
129
+ end
130
+ end
@@ -0,0 +1,51 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <XML>
3
+ <REQUEST>
4
+ <ACTION>INSERT_ORDERWITHPAYMENT</ACTION>
5
+ <META>
6
+ <IPADDRESS>67.207.118.57/29</IPADDRESS>
7
+ <MERCHANTID>5393</MERCHANTID>
8
+ <VERSION>1.0</VERSION>
9
+ <REQUESTIPADDRESS>192.168.41.12</REQUESTIPADDRESS>
10
+ </META>
11
+ <PARAMS>
12
+ <ORDER>
13
+ <ORDERID>51</ORDERID>
14
+ <AMOUNT>100</AMOUNT>
15
+ <CURRENCYCODE>USD</CURRENCYCODE>
16
+ <LANGUAGECODE>en</LANGUAGECODE>
17
+ <COUNTRYCODE>US</COUNTRYCODE>
18
+ <MERCHANTREFERENCE>51</MERCHANTREFERENCE>
19
+ </ORDER>
20
+ <PAYMENT>
21
+ <PAYMENTPRODUCTID>1</PAYMENTPRODUCTID>
22
+ <AMOUNT>100</AMOUNT>
23
+ <CURRENCYCODE>USD</CURRENCYCODE>
24
+ <LANGUAGECODE>en</LANGUAGECODE>
25
+ <COUNTRYCODE>US</COUNTRYCODE>
26
+ <EXPIRYDATE>0412</EXPIRYDATE>
27
+ <CREDITCARDNUMBER>4444333322211211</CREDITCARDNUMBER>
28
+ </PAYMENT>
29
+ </PARAMS>
30
+ <RESPONSE>
31
+ <RESULT>OK</RESULT>
32
+ <META>
33
+ <REQUESTID>4217</REQUESTID>
34
+ <RESPONSEDATETIME>20100410001554</RESPONSEDATETIME>
35
+ </META>
36
+ <ROW>
37
+ <STATUSID>525</STATUSID>
38
+ <FRAUDRESULT>C</FRAUDRESULT>
39
+ <ADDITIONALREFERENCE>51</ADDITIONALREFERENCE>
40
+ <FRAUDCODE>0330</FRAUDCODE>
41
+ <EXTERNALREFERENCE>51</EXTERNALREFERENCE>
42
+ <EFFORTID>1</EFFORTID>
43
+ <PAYMENTREFERENCE>0</PAYMENTREFERENCE>
44
+ <ATTEMPTID>1</ATTEMPTID>
45
+ <MERCHANTID>5393</MERCHANTID>
46
+ <STATUSDATE>20100410001554</STATUSDATE>
47
+ <ORDERID>51</ORDERID>
48
+ </ROW>
49
+ </RESPONSE>
50
+ </REQUEST>
51
+ </XML>
@@ -0,0 +1,29 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <XML>
3
+ <REQUEST>
4
+ <ACTION>CONVERT_AMOUNT</ACTION>
5
+ <META>
6
+ <IPADDRESS/>
7
+ <MERCHANTID>1234</MERCHANTID>
8
+ <VERSION>1.0</VERSION>
9
+ <REQUESTIPADDRESS>192.168.1.1</REQUESTIPADDRESS>
10
+ </META>
11
+ <PARAMS>
12
+ <GENERAL>
13
+ <AMOUNT>799</AMOUNT>
14
+ <SOURCECURRENCYCODE>GBP</SOURCECURRENCYCODE>
15
+ <TARGETCURRENCYCODE>USD</TARGETCURRENCYCODE>
16
+ </GENERAL>
17
+ </PARAMS>
18
+ <RESPONSE>
19
+ <RESULT>OK</RESULT>
20
+ <META>
21
+ <REQUESTID>16342</REQUESTID>
22
+ <RESPONSEDATETIME>20100415021355</RESPONSEDATETIME>
23
+ </META>
24
+ <ROW>
25
+ <CONVERTEDAMOUNT>1174</CONVERTEDAMOUNT>
26
+ </ROW>
27
+ </RESPONSE>
28
+ </REQUEST>
29
+ </XML>
@@ -0,0 +1,36 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <XML>
3
+ <REQUEST>
4
+ <ACTION>DO_REFUND</ACTION>
5
+ <META>
6
+ <IPADDRESS>192.168.1.1</IPADDRESS>
7
+ <MERCHANTID>1234</MERCHANTID>
8
+ <VERSION>1.0</VERSION>
9
+ <REQUESTIPADDRESS>192.168.1.1</REQUESTIPADDRESS>
10
+ </META>
11
+ <PARAMS>
12
+ <PAYMENT>
13
+ <ORDERID>2</ORDERID>
14
+ <MERCHANTREFERENCE>2</MERCHANTREFERENCE>
15
+ </PAYMENT>
16
+ </PARAMS>
17
+ <RESPONSE>
18
+ <RESULT>OK</RESULT>
19
+ <META>
20
+ <REQUESTID>1088</REQUESTID>
21
+ <RESPONSEDATETIME>20100409202154</RESPONSEDATETIME>
22
+ </META>
23
+ <ROW>
24
+ <STATUSID>800</STATUSID>
25
+ <ADDITIONALREFERENCE>2</ADDITIONALREFERENCE>
26
+ <EXTERNALREFERENCE>2</EXTERNALREFERENCE>
27
+ <EFFORTID>-1</EFFORTID>
28
+ <PAYMENTREFERENCE>0</PAYMENTREFERENCE>
29
+ <ATTEMPTID>1</ATTEMPTID>
30
+ <MERCHANTID>1234</MERCHANTID>
31
+ <STATUSDATE>20100409202154</STATUSDATE>
32
+ <ORDERID>2</ORDERID>
33
+ </ROW>
34
+ </RESPONSE>
35
+ </REQUEST>
36
+ </XML>
@@ -0,0 +1,72 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <XML>
3
+ <REQUEST>
4
+ <ACTION>GET_ORDERSTATUS</ACTION>
5
+ <META>
6
+ <IPADDRESS/>
7
+ <MERCHANTID>5393</MERCHANTID>
8
+ <VERSION>1.0</VERSION>
9
+ <REQUESTIPADDRESS>192.168.41.12</REQUESTIPADDRESS>
10
+ </META>
11
+ <PARAMS>
12
+ <ORDER>
13
+ <ORDERID>19</ORDERID>
14
+ </ORDER>
15
+ </PARAMS>
16
+ <RESPONSE>
17
+ <RESULT>OK</RESULT>
18
+ <META>
19
+ <REQUESTID>349642</REQUESTID>
20
+ <RESPONSEDATETIME>20100424002011</RESPONSEDATETIME>
21
+ </META>
22
+ <ROW>
23
+ <MERCHANTID>5393</MERCHANTID>
24
+ <ORDERID>19</ORDERID>
25
+ <EFFORTID>1</EFFORTID>
26
+ <ATTEMPTID>1</ATTEMPTID>
27
+ <PAYMENTREFERENCE>0</PAYMENTREFERENCE>
28
+ <MERCHANTREFERENCE>19</MERCHANTREFERENCE>
29
+ <STATUSID>100</STATUSID>
30
+ <PAYMENTMETHODID>1</PAYMENTMETHODID>
31
+ <PAYMENTPRODUCTID>130</PAYMENTPRODUCTID>
32
+ <CURRENCYCODE>EUR</CURRENCYCODE>
33
+ <AMOUNT>100</AMOUNT>
34
+ <STATUSDATE>20100408234145</STATUSDATE>
35
+ <ERRORNUMBER>430330</ERRORNUMBER>
36
+ <ERRORMESSAGE>INVALID_CARD_NUMBER</ERRORMESSAGE>
37
+ </ROW>
38
+ <ROW>
39
+ <MERCHANTID>5393</MERCHANTID>
40
+ <ORDERID>19</ORDERID>
41
+ <EFFORTID>1</EFFORTID>
42
+ <ATTEMPTID>1</ATTEMPTID>
43
+ <PAYMENTREFERENCE>0</PAYMENTREFERENCE>
44
+ <MERCHANTREFERENCE>19</MERCHANTREFERENCE>
45
+ <STATUSID>100</STATUSID>
46
+ <PAYMENTMETHODID>1</PAYMENTMETHODID>
47
+ <PAYMENTPRODUCTID>130</PAYMENTPRODUCTID>
48
+ <CURRENCYCODE>EUR</CURRENCYCODE>
49
+ <AMOUNT>100</AMOUNT>
50
+ <STATUSDATE>20100408234145</STATUSDATE>
51
+ <ERRORNUMBER>430330</ERRORNUMBER>
52
+ <ERRORMESSAGE>Not authorised</ERRORMESSAGE>
53
+ </ROW>
54
+ <ROW>
55
+ <MERCHANTID>5393</MERCHANTID>
56
+ <ORDERID>19</ORDERID>
57
+ <EFFORTID>1</EFFORTID>
58
+ <ATTEMPTID>1</ATTEMPTID>
59
+ <PAYMENTREFERENCE>0</PAYMENTREFERENCE>
60
+ <MERCHANTREFERENCE>19</MERCHANTREFERENCE>
61
+ <STATUSID>100</STATUSID>
62
+ <PAYMENTMETHODID>1</PAYMENTMETHODID>
63
+ <PAYMENTPRODUCTID>130</PAYMENTPRODUCTID>
64
+ <CURRENCYCODE>EUR</CURRENCYCODE>
65
+ <AMOUNT>100</AMOUNT>
66
+ <STATUSDATE>20100408234145</STATUSDATE>
67
+ <ERRORNUMBER>430330</ERRORNUMBER>
68
+ <ERRORMESSAGE>Sorry, your payment failed. Please check your payment details and try again</ERRORMESSAGE>
69
+ </ROW>
70
+ </RESPONSE>
71
+ </REQUEST>
72
+ </XML>
@@ -0,0 +1,50 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <XML>
3
+ <REQUEST>
4
+ <ACTION>GET_ORDERSTATUS</ACTION>
5
+ <META>
6
+ <IPADDRESS/>
7
+ <MERCHANTID>5393</MERCHANTID>
8
+ <VERSION>2.0</VERSION>
9
+ <REQUESTIPADDRESS>192.168.41.12</REQUESTIPADDRESS>
10
+ </META>
11
+ <PARAMS>
12
+ <ORDER>
13
+ <ORDERID>53</ORDERID>
14
+ </ORDER>
15
+ </PARAMS>
16
+ <RESPONSE>
17
+ <RESULT>OK</RESULT>
18
+ <META>
19
+ <REQUESTID>350556</REQUESTID>
20
+ <RESPONSEDATETIME>20100424020743</RESPONSEDATETIME>
21
+ </META>
22
+ <STATUS>
23
+ <MERCHANTREFERENCE>53</MERCHANTREFERENCE>
24
+ <PAYMENTMETHODID>1</PAYMENTMETHODID>
25
+ <STATUSID>100</STATUSID>
26
+ <CURRENCYCODE>USD</CURRENCYCODE>
27
+ <EFFORTID>1</EFFORTID>
28
+ <PAYMENTREFERENCE>0</PAYMENTREFERENCE>
29
+ <ATTEMPTID>1</ATTEMPTID>
30
+ <MERCHANTID>5393</MERCHANTID>
31
+ <AMOUNT>100</AMOUNT>
32
+ <STATUSDATE>20100410012920</STATUSDATE>
33
+ <PAYMENTPRODUCTID>1</PAYMENTPRODUCTID>
34
+ <ORDERID>53</ORDERID>
35
+ <ERRORS>
36
+ <ERROR>
37
+ <TYPE>S</TYPE>
38
+ <CODE>20001000</CODE>
39
+ <MESSAGE>20001000 REQUEST 350556 NULL VALUE NOT ALLOWED FOR CREDITCARDNUMBER</MESSAGE>
40
+ </ERROR>
41
+ <ERROR>
42
+ <TYPE>S</TYPE>
43
+ <CODE>20001000</CODE>
44
+ <MESSAGE>20001000 REQUEST 350556 NULL VALUE NOT ALLOWED FOR EXPIRYDATE</MESSAGE>
45
+ </ERROR>
46
+ </ERRORS>
47
+ </STATUS>
48
+ </RESPONSE>
49
+ </REQUEST>
50
+ </XML>