hypercharge-schema 1.24.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +7 -0
  3. data/.travis.yml +6 -0
  4. data/CHANGELOG.md +3 -0
  5. data/Gemfile +7 -0
  6. data/Gemfile.lock +33 -0
  7. data/LICENSE.txt +22 -0
  8. data/README.md +73 -0
  9. data/Rakefile +14 -0
  10. data/composer.json +17 -0
  11. data/hypercharge-schema.gemspec +27 -0
  12. data/json/MobilePayment.json +73 -0
  13. data/json/WpfPayment.json +99 -0
  14. data/json/authorize.json +77 -0
  15. data/json/authorize3d.json +173 -0
  16. data/json/capture.json +42 -0
  17. data/json/debit_sale.json +73 -0
  18. data/json/direct_pay24_sale.json +85 -0
  19. data/json/giro_pay_sale.json +85 -0
  20. data/json/ideal_sale.json +87 -0
  21. data/json/init_recurring_authorize.json +81 -0
  22. data/json/init_recurring_debit_authorize.json +77 -0
  23. data/json/init_recurring_debit_sale.json +77 -0
  24. data/json/init_recurring_sale.json +81 -0
  25. data/json/pay_in_advance.json +61 -0
  26. data/json/pay_pal.json +65 -0
  27. data/json/pay_safe_card_sale.json +69 -0
  28. data/json/payment_on_delivery.json +57 -0
  29. data/json/purchase_on_account.json +61 -0
  30. data/json/reconcile.json +20 -0
  31. data/json/recurring_debit_sale.json +45 -0
  32. data/json/recurring_sale.json +45 -0
  33. data/json/referenced_fund_transfer.json +46 -0
  34. data/json/refund.json +42 -0
  35. data/json/sale.json +77 -0
  36. data/json/sale3d.json +173 -0
  37. data/json/scheduler_create.json +46 -0
  38. data/json/scheduler_index.json +34 -0
  39. data/json/scheduler_update.json +35 -0
  40. data/json/types.json +385 -0
  41. data/json/void.json +33 -0
  42. data/lib/php/JsonSchemaFixture.php +12 -0
  43. data/lib/php/JsonSchemaValidator.php +47 -0
  44. data/lib/ruby/hypercharge/schema.rb +31 -0
  45. data/lib/ruby/hypercharge/schema/fixture.rb +30 -0
  46. data/lib/ruby/hypercharge/schema/version.rb +7 -0
  47. data/package.json +27 -0
  48. data/test/fixtures/notifications/PaymentNotification_echo.xml +4 -0
  49. data/test/fixtures/notifications/TransactionNotification_echo.xml +4 -0
  50. data/test/fixtures/notifications/recurring_event.json +13 -0
  51. data/test/fixtures/notifications/scheduler.json +7 -0
  52. data/test/fixtures/requests/MobilePayment.json +35 -0
  53. data/test/fixtures/requests/MobilePayment.xml +34 -0
  54. data/test/fixtures/requests/WpfPayment.json +40 -0
  55. data/test/fixtures/requests/WpfPayment.xml +39 -0
  56. data/test/fixtures/requests/WpfPayment_cancel.xml +4 -0
  57. data/test/fixtures/requests/WpfPayment_capture.xml +4 -0
  58. data/test/fixtures/requests/WpfPayment_refund.xml +4 -0
  59. data/test/fixtures/requests/WpfPayment_void.xml +4 -0
  60. data/test/fixtures/requests/authorize.json +29 -0
  61. data/test/fixtures/requests/authorize.xml +28 -0
  62. data/test/fixtures/requests/authorize3d_async.json +32 -0
  63. data/test/fixtures/requests/authorize3d_async.xml +31 -0
  64. data/test/fixtures/requests/authorize3d_sync.json +34 -0
  65. data/test/fixtures/requests/authorize3d_sync.xml +33 -0
  66. data/test/fixtures/requests/capture.json +10 -0
  67. data/test/fixtures/requests/capture.xml +9 -0
  68. data/test/fixtures/requests/debit_sale.json +28 -0
  69. data/test/fixtures/requests/debit_sale.xml +27 -0
  70. data/test/fixtures/requests/direct_pay24_sale.json +31 -0
  71. data/test/fixtures/requests/direct_pay24_sale.xml +30 -0
  72. data/test/fixtures/requests/giro_pay_sale.json +31 -0
  73. data/test/fixtures/requests/giro_pay_sale.xml +30 -0
  74. data/test/fixtures/requests/ideal_sale.json +31 -0
  75. data/test/fixtures/requests/ideal_sale.xml +30 -0
  76. data/test/fixtures/requests/init_recurring_authorize.json +34 -0
  77. data/test/fixtures/requests/init_recurring_authorize.xml +33 -0
  78. data/test/fixtures/requests/init_recurring_debit_authorize.json +33 -0
  79. data/test/fixtures/requests/init_recurring_debit_authorize.xml +32 -0
  80. data/test/fixtures/requests/init_recurring_debit_sale.json +34 -0
  81. data/test/fixtures/requests/init_recurring_debit_sale.xml +32 -0
  82. data/test/fixtures/requests/init_recurring_sale.json +34 -0
  83. data/test/fixtures/requests/init_recurring_sale.xml +33 -0
  84. data/test/fixtures/requests/init_recurring_sale_with_recurring_schedule.json +34 -0
  85. data/test/fixtures/requests/pay_in_advance.json +24 -0
  86. data/test/fixtures/requests/pay_in_advance.xml +23 -0
  87. data/test/fixtures/requests/pay_pal.json +23 -0
  88. data/test/fixtures/requests/pay_pal.xml +22 -0
  89. data/test/fixtures/requests/pay_safe_card_sale.json +23 -0
  90. data/test/fixtures/requests/pay_safe_card_sale.xml +23 -0
  91. data/test/fixtures/requests/payment_on_delivery.json +24 -0
  92. data/test/fixtures/requests/payment_on_delivery.xml +23 -0
  93. data/test/fixtures/requests/purchase_on_account.json +26 -0
  94. data/test/fixtures/requests/purchase_on_account.xml +23 -0
  95. data/test/fixtures/requests/reconcile.json +5 -0
  96. data/test/fixtures/requests/reconcile.xml +4 -0
  97. data/test/fixtures/requests/reconcile_by_date.json +7 -0
  98. data/test/fixtures/requests/reconcile_by_date.xml +6 -0
  99. data/test/fixtures/requests/recurring_debit_sale.json +11 -0
  100. data/test/fixtures/requests/recurring_debit_sale.xml +10 -0
  101. data/test/fixtures/requests/recurring_event.xml +4 -0
  102. data/test/fixtures/requests/recurring_sale.json +11 -0
  103. data/test/fixtures/requests/recurring_sale.xml +10 -0
  104. data/test/fixtures/requests/referenced_fund_transfer.json +11 -0
  105. data/test/fixtures/requests/referenced_fund_transfer.xml +10 -0
  106. data/test/fixtures/requests/refund.json +10 -0
  107. data/test/fixtures/requests/refund.xml +9 -0
  108. data/test/fixtures/requests/risk_params.json +10 -0
  109. data/test/fixtures/requests/risk_params.xml +9 -0
  110. data/test/fixtures/requests/sale.json +29 -0
  111. data/test/fixtures/requests/sale.xml +28 -0
  112. data/test/fixtures/requests/sale3d_async.json +32 -0
  113. data/test/fixtures/requests/sale3d_async.xml +31 -0
  114. data/test/fixtures/requests/sale3d_sync.json +34 -0
  115. data/test/fixtures/requests/sale3d_sync.xml +33 -0
  116. data/test/fixtures/requests/scheduler_create.json +9 -0
  117. data/test/fixtures/requests/scheduler_index_get_params.json +9 -0
  118. data/test/fixtures/requests/scheduler_update.json +8 -0
  119. data/test/fixtures/requests/void.json +8 -0
  120. data/test/fixtures/requests/void.xml +7 -0
  121. data/test/fixtures/responses/MobilePayment_new.json +20 -0
  122. data/test/fixtures/responses/MobilePayment_new.xml +19 -0
  123. data/test/fixtures/responses/PaymentNotification_echo.xml +4 -0
  124. data/test/fixtures/responses/PaymentTransactionNotification_echo.xml +4 -0
  125. data/test/fixtures/responses/WpfPayment_cancel.xml +13 -0
  126. data/test/fixtures/responses/WpfPayment_captured.xml +39 -0
  127. data/test/fixtures/responses/WpfPayment_error.json +8 -0
  128. data/test/fixtures/responses/WpfPayment_error.xml +7 -0
  129. data/test/fixtures/responses/WpfPayment_find.xml +39 -0
  130. data/test/fixtures/responses/WpfPayment_new.json +16 -0
  131. data/test/fixtures/responses/WpfPayment_new.xml +17 -0
  132. data/test/fixtures/responses/WpfPayment_refunded.xml +39 -0
  133. data/test/fixtures/responses/WpfPayment_voided.xml +39 -0
  134. data/test/fixtures/responses/authorize3d_pending_async.xml +15 -0
  135. data/test/fixtures/responses/authorize3d_sync.xml +14 -0
  136. data/test/fixtures/responses/authorize_approved.xml +14 -0
  137. data/test/fixtures/responses/authorize_error.json +16 -0
  138. data/test/fixtures/responses/authorize_error.xml +15 -0
  139. data/test/fixtures/responses/capture.xml +14 -0
  140. data/test/fixtures/responses/create_chargeback.xml +12 -0
  141. data/test/fixtures/responses/create_chargeback_reversal.xml +12 -0
  142. data/test/fixtures/responses/create_charged_debit_sale.xml +12 -0
  143. data/test/fixtures/responses/create_debit_chargeback.xml +12 -0
  144. data/test/fixtures/responses/create_deposit.xml +12 -0
  145. data/test/fixtures/responses/create_pre_arbitration.xml +12 -0
  146. data/test/fixtures/responses/create_rejected_debit_sale.xml +12 -0
  147. data/test/fixtures/responses/create_retrieval_request.xml +12 -0
  148. data/test/fixtures/responses/debit_sale.xml +12 -0
  149. data/test/fixtures/responses/direct_pay24_sale.xml +15 -0
  150. data/test/fixtures/responses/giro_pay_sale.xml +15 -0
  151. data/test/fixtures/responses/ideal_sale.xml +17 -0
  152. data/test/fixtures/responses/init_recurring_authorize.xml +14 -0
  153. data/test/fixtures/responses/init_recurring_debit_authorize.xml +17 -0
  154. data/test/fixtures/responses/init_recurring_debit_sale.xml +17 -0
  155. data/test/fixtures/responses/init_recurring_sale.xml +14 -0
  156. data/test/fixtures/responses/pay_in_advance.xml +17 -0
  157. data/test/fixtures/responses/pay_pal.xml +15 -0
  158. data/test/fixtures/responses/pay_safe_card_sale.xml +15 -0
  159. data/test/fixtures/responses/payment_on_delivery.xml +14 -0
  160. data/test/fixtures/responses/purchase_on_account.xml +18 -0
  161. data/test/fixtures/responses/reconcile_by_date_empty_result.xml +3 -0
  162. data/test/fixtures/responses/reconcile_by_date_page_1.xml +1293 -0
  163. data/test/fixtures/responses/reconcile_by_date_page_2.xml +1346 -0
  164. data/test/fixtures/responses/reconcile_by_date_page_3.xml +1394 -0
  165. data/test/fixtures/responses/reconcile_by_date_single_result.xml +16 -0
  166. data/test/fixtures/responses/recurring_debit_sale.xml +16 -0
  167. data/test/fixtures/responses/recurring_event.json +22 -0
  168. data/test/fixtures/responses/recurring_event.xml +21 -0
  169. data/test/fixtures/responses/recurring_sale.xml +14 -0
  170. data/test/fixtures/responses/referenced_fund_transfer.xml +14 -0
  171. data/test/fixtures/responses/refund.xml +14 -0
  172. data/test/fixtures/responses/sale.xml +12 -0
  173. data/test/fixtures/responses/sale3d_async.xml +15 -0
  174. data/test/fixtures/responses/sale3d_sync.xml +14 -0
  175. data/test/fixtures/responses/scheduled_transactions_empty.json +8 -0
  176. data/test/fixtures/responses/scheduled_transactions_one.json +22 -0
  177. data/test/fixtures/responses/scheduler.json +12 -0
  178. data/test/fixtures/responses/scheduler_empty_result.json +8 -0
  179. data/test/fixtures/responses/scheduler_error.json +7 -0
  180. data/test/fixtures/responses/scheduler_next.json +4 -0
  181. data/test/fixtures/responses/scheduler_page_1.json +93 -0
  182. data/test/fixtures/responses/scheduler_page_2.json +45 -0
  183. data/test/fixtures/responses/scheduler_single_result.json +21 -0
  184. data/test/fixtures/responses/void.xml +12 -0
  185. data/test/js/mobile_payment_test.js +287 -0
  186. data/test/php/all.php +9 -0
  187. data/test/php/authorize3d_test.php +546 -0
  188. data/test/php/authorize_test.php +546 -0
  189. data/test/php/capture_test.php +241 -0
  190. data/test/php/json_schema_validator_test.php +24 -0
  191. data/test/php/mobile_payment_test.php +238 -0
  192. data/test/php/reconcile_test.php +21 -0
  193. data/test/php/referenced_fund_transfer_test.php +183 -0
  194. data/test/php/refund_test.php +237 -0
  195. data/test/php/sale_test.php +546 -0
  196. data/test/php/test_helper.php +29 -0
  197. data/test/php/void_test.php +163 -0
  198. data/test/php/wpf_payment_test.php +19 -0
  199. data/test/ruby/authorize3d_async_spec.rb +29 -0
  200. data/test/ruby/authorize3d_sync_spec.rb +27 -0
  201. data/test/ruby/authorize_spec.rb +25 -0
  202. data/test/ruby/capture_spec.rb +16 -0
  203. data/test/ruby/debit_sale_spec.rb +26 -0
  204. data/test/ruby/direct_pay24_sale_spec.rb +30 -0
  205. data/test/ruby/giro_pay_sale_spec.rb +30 -0
  206. data/test/ruby/ideal_sale_spec.rb +29 -0
  207. data/test/ruby/init_recurring_authorize_spec.rb +26 -0
  208. data/test/ruby/init_recurring_debit_authorize_spec.rb +27 -0
  209. data/test/ruby/init_recurring_debit_sale_spec.rb +27 -0
  210. data/test/ruby/init_recurring_sale_spec.rb +26 -0
  211. data/test/ruby/mobile_payment_spec.rb +22 -0
  212. data/test/ruby/pay_in_advance_spec.rb +23 -0
  213. data/test/ruby/pay_pal_spec.rb +25 -0
  214. data/test/ruby/pay_safe_card_sale_spec.rb +24 -0
  215. data/test/ruby/payment_on_delivery_spec.rb +21 -0
  216. data/test/ruby/purchase_on_account_spec.rb +23 -0
  217. data/test/ruby/reconcile_spec.rb +11 -0
  218. data/test/ruby/recurring_debit_sale_spec.rb +17 -0
  219. data/test/ruby/recurring_sale_spec.rb +17 -0
  220. data/test/ruby/referenced_fund_transfer_spec.rb +17 -0
  221. data/test/ruby/refund_spec.rb +16 -0
  222. data/test/ruby/sale3d_async_spec.rb +29 -0
  223. data/test/ruby/sale3d_sync_spec.rb +27 -0
  224. data/test/ruby/sale_spec.rb +25 -0
  225. data/test/ruby/scheduler_spec.rb +43 -0
  226. data/test/ruby/test_helper.rb +74 -0
  227. data/test/ruby/types_specs.rb +1494 -0
  228. data/test/ruby/void_spec.rb +14 -0
  229. data/test/ruby/wpf_payment_spec.rb +27 -0
  230. metadata +527 -0
@@ -0,0 +1,33 @@
1
+ {
2
+ "description" : "Hypercharge void Transaction request",
3
+ "type":"object",
4
+ "$schema": "http://json-schema.org/draft-03/schema",
5
+ "additionalProperties":false,
6
+ "properties": {
7
+ "payment_transaction": {
8
+ "type":"object",
9
+ "required":true,
10
+ "additionalProperties":false,
11
+ "properties": {
12
+ "transaction_type": {
13
+ "description": "Type of the Transaction => static 'void'",
14
+ "required":true,
15
+ "type" : "string",
16
+ "pattern" : "^void$"
17
+ },
18
+ "transaction_id": {
19
+ "required":true,
20
+ "extends" : "types.json#/transaction_id"
21
+ },
22
+ "usage": {
23
+ "required":false,
24
+ "extends" : "types.json#/usage"
25
+ },
26
+ "reference_id": {
27
+ "required":true,
28
+ "extends": "types.json#/reference_id"
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,12 @@
1
+ <?php
2
+ namespace Hypercharge;
3
+
4
+ class JsonSchemaFixture {
5
+ static function request($file) {
6
+ return file_get_contents(dirname(dirname(__DIR__)).'/test/fixtures/requests/'. $file);
7
+ }
8
+ static function response($file) {
9
+ return file_get_contents(dirname(dirname(__DIR__)).'/test/fixtures/responses/'. $file);
10
+ }
11
+ // TODO notification
12
+ }
@@ -0,0 +1,47 @@
1
+ <?php
2
+ namespace Hypercharge;
3
+
4
+ const SCHEMA_VERSION = '1.24.5';
5
+
6
+ class JsonSchemaValidator {
7
+ private $schemaUri;
8
+ private $schema;
9
+
10
+ /**
11
+ * @param string $schemaName e.g. "MobilePayment" for /json/MobilePayment.json or "sale" for /json/sale.json
12
+ */
13
+ function __construct($schemaName) {
14
+ $this->schemaUri = 'file://'. self::schemaPathFor($schemaName);
15
+
16
+ //var_dump('schemaUri', $this->schemaUri);
17
+
18
+ $retriever = new \JsonSchema\Uri\UriRetriever;
19
+ $this->schema = $retriever->retrieve($this->schemaUri);
20
+
21
+ // If you use '$ref' or 'extends' or if you are unsure, resolve those references here
22
+ // This modifies the $schema object
23
+ $refResolver = new \JsonSchema\RefResolver($retriever);
24
+ $refResolver->resolve($this->schema, $this->schemaUri);
25
+ }
26
+
27
+ /**
28
+ * @param Object $object the instance to validate against the json schema
29
+ * @return mixed array containing errors or false
30
+ */
31
+ function check($object) {
32
+ $validator = new \JsonSchema\Validator();
33
+ $validator->check($object, $this->schema);
34
+ $errors = $validator->getErrors();
35
+ if(empty($errors)) return false;
36
+ return $errors;
37
+ }
38
+
39
+ /**
40
+ * doesn't check if schema file exists
41
+ * @param string $type e.g. 'sale', 'authorize', 'capture', 'void', ...
42
+ * @return string absolute path to schema file
43
+ */
44
+ static function schemaPathFor($type) {
45
+ return dirname(dirname(__DIR__)).'/json/'. $type .'.json';
46
+ }
47
+ }
@@ -0,0 +1,31 @@
1
+ # encoding: UTF-8
2
+
3
+ require "json-schema"
4
+ require "hypercharge/schema/version"
5
+ require "hypercharge/schema/fixture"
6
+
7
+
8
+ module Hypercharge
9
+ module Schema
10
+
11
+ # validates a hash with JSON-Schema
12
+ def self.validate(type, data)
13
+ JSON::Validator.fully_validate(schema_path_for(type), data, :version => :draft3)
14
+ end
15
+
16
+ # returns the path for a JSON-Schema
17
+ # @param [Hypercharge::Payment::Type, Hypercharge::PaymentTransaction::Type] type the type
18
+ # @return [String] path
19
+ def self.schema_path_for(type)
20
+ File.expand_path("../../../../json/#{type}.json", __FILE__)
21
+ end
22
+
23
+ # yields with json schema files full path.
24
+ # If you need the schema as hash, please feel free to IO.read() and JSON.parse().
25
+ def self.each
26
+ Dir[File.expand_path("../../../../json/*.json", __FILE__)].each do |path|
27
+ yield path
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,30 @@
1
+ # encoding: UTF-8
2
+
3
+ require 'json'
4
+
5
+ module Hypercharge
6
+ module Schema::Fixture
7
+
8
+ # @param file String without ".xml" suffix e.g. "requests/sale" or "responses/WpfPayment_find"
9
+ # @return String contents (xml string) of fixture file e.g. /foo/hypercharge-schema/test/fixtures/requests/sale.xml
10
+ # or /foo/hypercharge-schema/test/fixtures/responses/WpfPayment_find.xml
11
+ def self.xml(file)
12
+ IO.read(path("#{file}.xml"))
13
+ end
14
+
15
+ # @param file String without ".json" suffix e.g. "requests/sale" or "responses/WpfPayment_find"
16
+ # @return Hash parsed json fixture in e.g. /foo/hypercharge-schema/test/fixtures/requests/sale.json
17
+ # or /foo/hypercharge-schema/test/fixtures/responses/WpfPayment_find.json
18
+ def self.json(file)
19
+ JSON.parse(IO.read(path("#{file}.json")))
20
+ end
21
+
22
+ # @param file String with (!) suffix e.g. "requests/sale.xml" or "responses/WpfPayment_find.json"
23
+ # @return String absolute path e.g. "/foo/hypercharge-schema/test/fixtures/requests/sale.xml"
24
+ # or "/foo/hypercharge-schema/test/fixtures/responses/WpfPayment_find.json"
25
+ def self.path(file)
26
+ File.expand_path("../../../../../test/fixtures/#{file}", __FILE__)
27
+ end
28
+
29
+ end
30
+ end
@@ -0,0 +1,7 @@
1
+ # encoding: UTF-8
2
+
3
+ module Hypercharge
4
+ module Schema
5
+ VERSION = "1.24.5"
6
+ end
7
+ end
@@ -0,0 +1,27 @@
1
+ {
2
+ "author": "Jan Mentzel <jan@hypercharge.net>",
3
+ "name": "hypercharge-schema",
4
+ "dependencies": {
5
+ },
6
+ "main": "./lib",
7
+ "devDependencies": {
8
+ "mocha": "~1.8.2",
9
+ "chai": "~1.5.0",
10
+ "jsonschema": "git://github.com/hypercharge/jsonschema.git#master"
11
+ },
12
+ "optionalDependencies": {},
13
+ "engines": {
14
+ "node": "*"
15
+ },
16
+ "keywords": [
17
+ "payment"
18
+ ],
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git://github.com/hypercharge/json-schema.git"
22
+ },
23
+ "description": "JSON Schemas for validation of hypercharge payment gateway and WPF requests",
24
+ "scripts": {
25
+ "test": "./node_modules/.bin/mocha -R spec"
26
+ }
27
+ }
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <notification_echo>
3
+ <payment_unique_id>26aa150ee68b1b2d6758a0e6c44fce4c</payment_unique_id>
4
+ </notification_echo>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <notification_echo>
3
+ <unique_id>fc6c3c8c0219730c7a099eaa540f70dc</unique_id>
4
+ </notification_echo>
@@ -0,0 +1,13 @@
1
+ {
2
+ "schedule_unique_id":"26aa150ee68b1b2d6758a0e6c44fce4c",
3
+ "schedule_event_due_date":"2013-01-21 00:00:00",
4
+ "schedule_event_finalized_date":"2013-01-22 00:00:00",
5
+ "schedule_event_status":"approved",
6
+ "event_unique_id":"bad08183a9ec545daf0f24c48361aa10",
7
+ "notification_type":"recurring",
8
+ "signature":"c5219b3d385e74496b2b48a5497b347e102849f10eacd25b062f823bbd11249ce4e233f031c0ecebc9b691e69d23eb0c1cd65a79621152467b56ac2bf103b512",
9
+ "payment_transaction_channel_token":"e9fd7a957845450fb7ab9dccb498b6e1f6e1e3aa",
10
+ "payment_transaction_unique_id":"bad08183a9ec545daf0f24c48361aa10",
11
+ "payment_transaction_transaction_type":"recurring_sale",
12
+ "payment_transaction_status":"approved"
13
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "schedule_unique_id":"26aa150ee68b1b2d6758a0e6c44fce4c",
3
+ "schedule_end_date":"2013-01-21 00:00:00",
4
+ "schedule_status":"expiring",
5
+ "notification_type":"recurring_schedule",
6
+ "signature":"c5219b3d385e74496b2b48a5497b347e102849f10eacd25b062f823b"
7
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "payment":{
3
+ "type":"MobilePayment",
4
+ "amount":5000,
5
+ "currency":"EUR",
6
+ "transaction_id":"0AF671AF-4134-4BE7-BDF0-26E38B74106E",
7
+ "usage":"Order 12345 pucrchase of concert tickets",
8
+ "customer_email":"customer@example.com",
9
+ "customer_phone":"004903000000000",
10
+ "notification_url":"https://example.com/mobile_payment_notify",
11
+ "billing_address":{
12
+ "first_name":"John",
13
+ "last_name":"Doe",
14
+ "address1":"Torstr. 123",
15
+ "address2":"HH 5. OG",
16
+ "city":"Berlin",
17
+ "zip_code":"10115",
18
+ "country":"DE"
19
+ },
20
+ "transaction_types":[
21
+ "sale"
22
+ ],
23
+ "retries": 3,
24
+ "expires_in":3600,
25
+ "risk_params":{
26
+ "ssn":"This is a string",
27
+ "user_id":"This is a string"
28
+ },
29
+ "recurring_schedule": {
30
+ "start_date":"2013-05-01",
31
+ "amount": 5000,
32
+ "interval": "monthly"
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,34 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <payment>
3
+ <amount>5000</amount>
4
+ <billing_address>
5
+ <address1>Torstr. 123</address1>
6
+ <address2>HH 5. OG</address2>
7
+ <city>Berlin</city>
8
+ <country>DE</country>
9
+ <first_name>John</first_name>
10
+ <last_name>Doe</last_name>
11
+ <zip_code>10115</zip_code>
12
+ </billing_address>
13
+ <currency>EUR</currency>
14
+ <customer_email>customer@example.com</customer_email>
15
+ <customer_phone>004903000000000</customer_phone>
16
+ <expires_in>3600</expires_in>
17
+ <notification_url>https://example.com/mobile_payment_notify</notification_url>
18
+ <recurring_schedule>
19
+ <amount>5000</amount>
20
+ <interval>monthly</interval>
21
+ <start_date>2013-05-01</start_date>
22
+ </recurring_schedule>
23
+ <retries>3</retries>
24
+ <risk_params>
25
+ <ssn>This is a string</ssn>
26
+ <user_id>This is a string</user_id>
27
+ </risk_params>
28
+ <transaction_id>0AF671AF-4134-4BE7-BDF0-26E38B74106E</transaction_id>
29
+ <transaction_types>
30
+ <transaction_type>sale</transaction_type>
31
+ </transaction_types>
32
+ <type>MobilePayment</type>
33
+ <usage>Order 12345 pucrchase of concert tickets</usage>
34
+ </payment>
@@ -0,0 +1,40 @@
1
+ {
2
+ "payment":{
3
+ "type":"WpfPayment",
4
+ "amount":5000,
5
+ "currency":"EUR",
6
+ "transaction_id":"0AF671AF-4134-4BE7-BDF0-26E38B74106E",
7
+ "usage":"Order 12345 pucrchase of concert tickets",
8
+ "description": "You are about to buy 3 shoes at www.shoes.com!",
9
+ "editable_by_user":true,
10
+ "customer_email":"customer@example.com",
11
+ "customer_phone":"004903000000000",
12
+ "notification_url":"http://example.com/mobile_payment_notify",
13
+ "return_success_url":"http://example.com/payment_success",
14
+ "return_failure_url":"http://example.com/payment_failure",
15
+ "return_cancel_url":"http://example.com/payment_canceled",
16
+ "billing_address":{
17
+ "first_name":"John",
18
+ "last_name":"Doe",
19
+ "address1":"Torstr. 123",
20
+ "address2":"HH 5. OG",
21
+ "city":"Berlin",
22
+ "zip_code":"10115",
23
+ "country":"DE"
24
+ },
25
+ "transaction_types":[
26
+ "sale"
27
+ ],
28
+ "retries":3,
29
+ "expires_in":3600,
30
+ "risk_params":{
31
+ "ssn":"This is a string",
32
+ "user_id":"This is a string"
33
+ },
34
+ "recurring_schedule": {
35
+ "start_date":"2013-05-01",
36
+ "amount": 5000,
37
+ "interval": "monthly"
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,39 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <payment>
3
+ <amount>5000</amount>
4
+ <billing_address>
5
+ <address1>Torstr. 123</address1>
6
+ <address2>HH 5. OG</address2>
7
+ <city>Berlin</city>
8
+ <country>DE</country>
9
+ <first_name>John</first_name>
10
+ <last_name>Doe</last_name>
11
+ <zip_code>10115</zip_code>
12
+ </billing_address>
13
+ <currency>EUR</currency>
14
+ <customer_email>customer@example.com</customer_email>
15
+ <customer_phone>004903000000000</customer_phone>
16
+ <description>You are about to buy 3 shoes at www.shoes.com!</description>
17
+ <editable_by_user>true</editable_by_user>
18
+ <expires_in>3600</expires_in>
19
+ <notification_url>http://example.com/mobile_payment_notify</notification_url>
20
+ <recurring_schedule>
21
+ <amount>5000</amount>
22
+ <interval>monthly</interval>
23
+ <start_date>2013-05-01</start_date>
24
+ </recurring_schedule>
25
+ <retries>3</retries>
26
+ <return_cancel_url>http://example.com/payment_canceled</return_cancel_url>
27
+ <return_failure_url>http://example.com/payment_failure</return_failure_url>
28
+ <return_success_url>http://example.com/payment_success</return_success_url>
29
+ <risk_params>
30
+ <ssn>This is a string</ssn>
31
+ <user_id>This is a string</user_id>
32
+ </risk_params>
33
+ <transaction_id>0AF671AF-4134-4BE7-BDF0-26E38B74106E</transaction_id>
34
+ <transaction_types>
35
+ <transaction_type>sale</transaction_type>
36
+ </transaction_types>
37
+ <type>WpfPayment</type>
38
+ <usage>Order 12345 pucrchase of concert tickets</usage>
39
+ </payment>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <cancel>
3
+ <unique_id>26aa150ee68b1b2d6758a0e6c44fce4c</unique_id>
4
+ </cancel>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <capture>
3
+ <unique_id>26aa150ee68b1b2d6758a0e6c44fce4c</unique_id>
4
+ </capture>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <refund>
3
+ <unique_id>26aa150ee68b1b2d6758a0e6c44fce4c</unique_id>
4
+ </refund>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <void>
3
+ <unique_id>26aa150ee68b1b2d6758a0e6c44fce4c</unique_id>
4
+ </void>
@@ -0,0 +1,29 @@
1
+ {
2
+ "payment_transaction":{
3
+ "transaction_type": "authorize",
4
+ "transaction_id": "43671",
5
+ "usage": "40208 concert tickets",
6
+ "remote_ip": "245.253.2.12",
7
+ "amount":5000,
8
+ "currency": "USD",
9
+ "card_holder": "Emil Example",
10
+ "card_number": "4200000000000000",
11
+ "cvv": "123",
12
+ "expiration_month": "02",
13
+ "expiration_year": "2010",
14
+ "customer_email": "emil@example.com",
15
+ "customer_phone": "+49301234567",
16
+ "billing_address": {
17
+ "first_name": "Max",
18
+ "last_name": "Mustermann",
19
+ "address1": "Muster Str. 12",
20
+ "zip_code": "10178",
21
+ "city":"Berlin",
22
+ "country": "DE"
23
+ },
24
+ "risk_params":{
25
+ "ssn":"This is a string",
26
+ "user_id":"This is a string"
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <payment_transaction>
3
+ <amount>5000</amount>
4
+ <billing_address>
5
+ <address1>Muster Str. 12</address1>
6
+ <city>Berlin</city>
7
+ <country>DE</country>
8
+ <first_name>Max</first_name>
9
+ <last_name>Mustermann</last_name>
10
+ <zip_code>10178</zip_code>
11
+ </billing_address>
12
+ <card_holder>Emil Example</card_holder>
13
+ <card_number>4200000000000000</card_number>
14
+ <currency>USD</currency>
15
+ <customer_email>emil@example.com</customer_email>
16
+ <customer_phone>+49301234567</customer_phone>
17
+ <cvv>123</cvv>
18
+ <expiration_month>02</expiration_month>
19
+ <expiration_year>2010</expiration_year>
20
+ <remote_ip>245.253.2.12</remote_ip>
21
+ <risk_params>
22
+ <ssn>This is a string</ssn>
23
+ <user_id>This is a string</user_id>
24
+ </risk_params>
25
+ <transaction_id>43671</transaction_id>
26
+ <transaction_type>authorize</transaction_type>
27
+ <usage>40208 concert tickets</usage>
28
+ </payment_transaction>