WorldNet_HPP - Version 1.2.0

Version Notes

This module will overwrite your system.xml file.

Once you have added this you will need to go to the admin section of your Magento installation:

Magento Admin -> System -> Configuration
Click on "Payment Methods" (on the left)
You should then see "WorldNet TPS (via Payment Page)" appear as a payment method (if not see below). Click on this and select Enabled = "Yes".
Enter the test Currency, Terminal ID and your "Shared Secret". (These details were supplied by WorldNet TPS.)
Change the "New order status" to "Awaiting payment via WorldNet TPS".
Click "Apply" in the top right corner.

N.B. If the module does not appear on the "Payment Methods" page you may have to clear Magento's cache.
To do this go to System -> Cache Management, Change "No Change" to "Refresh" and then save the cache settings.

You must then setup the Receipt page URL in the WorldNet TPS Selfcare system. This should be set to:
"http://www.yoursite.com/index.php/worldnet/standard/successResponse"

Download this release

Release Info

Developer Magento Core Team
Extension WorldNet_HPP
Version 1.2.0
Comparing to
See all releases


Version 1.2.0

Files changed (38) hide show
  1. app/code/core/Mage/Sales/etc/config.xml +970 -0
  2. app/code/core/Mage/Worldnet/Block/Standard/Failure.php +62 -0
  3. app/code/core/Mage/Worldnet/Block/Standard/Form.php +43 -0
  4. app/code/core/Mage/Worldnet/Block/Standard/Redirect.php +58 -0
  5. app/code/core/Mage/Worldnet/Helper/Data.php +38 -0
  6. app/code/core/Mage/Worldnet/Model/Api/Debug.php +41 -0
  7. app/code/core/Mage/Worldnet/Model/Config.php +185 -0
  8. app/code/core/Mage/Worldnet/Model/Mysql4/Api/Debug.php +42 -0
  9. app/code/core/Mage/Worldnet/Model/Mysql4/Api/Debug/Collection.php +41 -0
  10. app/code/core/Mage/Worldnet/Model/Mysql4/Setup.php +39 -0
  11. app/code/core/Mage/Worldnet/Model/Session.php +42 -0
  12. app/code/core/Mage/Worldnet/Model/Source/CurrencyAction.php +49 -0
  13. app/code/core/Mage/Worldnet/Model/Source/ModeAction.php +48 -0
  14. app/code/core/Mage/Worldnet/Model/Source/PaymentAction.php +44 -0
  15. app/code/core/Mage/Worldnet/Model/Standard.php +465 -0
  16. app/code/core/Mage/Worldnet/controllers/StandardController.php +275 -0
  17. app/code/core/Mage/Worldnet/etc/config.xml +122 -0
  18. app/code/core/Mage/Worldnet/etc/system.xml +174 -0
  19. app/code/core/Mage/Worldnet/nbproject/private/private.properties +5 -0
  20. app/code/core/Mage/Worldnet/nbproject/private/private.xml +4 -0
  21. app/code/core/Mage/Worldnet/nbproject/project.properties +6 -0
  22. app/code/core/Mage/Worldnet/nbproject/project.xml +9 -0
  23. app/code/core/Mage/Worldnet/sql/worldnet_setup/mysql4-install-0.1.0.php +46 -0
  24. app/design/default/default/layout/worldnet.xml +43 -0
  25. app/design/default/default/template/worldnet/standard/failure.phtml +31 -0
  26. app/design/default/default/template/worldnet/standard/form.phtml +34 -0
  27. app/design/default/modern/layout/worldnet.xml +43 -0
  28. app/design/default/modern/template/worldnet/standard/failure.phtml +31 -0
  29. app/design/default/modern/template/worldnet/standard/form.phtml +34 -0
  30. app/design/frontend/default/default/layout/worldnet.xml +43 -0
  31. app/design/frontend/default/default/template/worldnet/standard/failure.phtml +31 -0
  32. app/design/frontend/default/default/template/worldnet/standard/form.phtml +34 -0
  33. app/design/frontend/default/modern/layout/worldnet.xml +43 -0
  34. app/design/frontend/default/modern/template/worldnet/standard/failure.phtml +31 -0
  35. app/design/frontend/default/modern/template/worldnet/standard/form.phtml +34 -0
  36. app/etc/modules/Mage_Worldnet.xml +38 -0
  37. app/locale/en_US/Mage_Worldnet.csv +28 -0
  38. package.xml +35 -0
app/code/core/Mage/Sales/etc/config.xml ADDED
@@ -0,0 +1,970 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_Sales
24
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_Sales>
31
+ <version>0.9.35</version>
32
+ </Mage_Sales>
33
+ </modules>
34
+ <global>
35
+ <fieldsets>
36
+ <sales_copy_order>
37
+ <customer_email><to_edit>*</to_edit></customer_email>
38
+ <customer_group_id><to_edit>*</to_edit></customer_group_id>
39
+ </sales_copy_order>
40
+ <sales_copy_order_billing_address>
41
+ <prefix><to_order>*</to_order></prefix>
42
+ <firstname><to_order>*</to_order></firstname>
43
+ <middlename><to_order>*</to_order></middlename>
44
+ <lastname><to_order>*</to_order></lastname>
45
+ <suffix><to_order>*</to_order></suffix>
46
+ <customer_address_id><to_order>*</to_order></customer_address_id>
47
+ <company><to_order>*</to_order></company>
48
+ <street><to_order>*</to_order></street>
49
+ <city><to_order>*</to_order></city>
50
+ <region><to_order>*</to_order></region>
51
+ <postcode><to_order>*</to_order></postcode>
52
+ <country_id><to_order>*</to_order></country_id>
53
+ <telephone><to_order>*</to_order></telephone>
54
+ <fax><to_order>*</to_order></fax>
55
+ <region_id><to_order>*</to_order></region_id>
56
+ </sales_copy_order_billing_address>
57
+ <sales_copy_order_shipping_address>
58
+ <prefix><to_order>*</to_order></prefix>
59
+ <firstname><to_order>*</to_order></firstname>
60
+ <middlename><to_order>*</to_order></middlename>
61
+ <lastname><to_order>*</to_order></lastname>
62
+ <suffix><to_order>*</to_order></suffix>
63
+ <customer_address_id><to_order>*</to_order></customer_address_id>
64
+ <company><to_order>*</to_order></company>
65
+ <street><to_order>*</to_order></street>
66
+ <city><to_order>*</to_order></city>
67
+ <region><to_order>*</to_order></region>
68
+ <postcode><to_order>*</to_order></postcode>
69
+ <country_id><to_order>*</to_order></country_id>
70
+ <telephone><to_order>*</to_order></telephone>
71
+ <fax><to_order>*</to_order></fax>
72
+ <region_id><to_order>*</to_order></region_id>
73
+ </sales_copy_order_shipping_address>
74
+ <sales_convert_quote>
75
+ <remote_ip><to_order>*</to_order></remote_ip>
76
+
77
+ <customer_id><to_order>*</to_order></customer_id>
78
+ <customer_email><to_order>*</to_order></customer_email>
79
+ <customer_prefix><to_order>*</to_order></customer_prefix>
80
+ <customer_firstname><to_order>*</to_order></customer_firstname>
81
+ <customer_middlename><to_order>*</to_order></customer_middlename>
82
+ <customer_lastname><to_order>*</to_order></customer_lastname>
83
+ <customer_suffix><to_order>*</to_order></customer_suffix>
84
+ <customer_group_id><to_order>*</to_order></customer_group_id>
85
+ <customer_tax_class_id><to_order>*</to_order></customer_tax_class_id>
86
+ <customer_note><to_order>*</to_order></customer_note>
87
+ <customer_note_notify><to_order>*</to_order></customer_note_notify>
88
+ <customer_is_guest><to_order>*</to_order></customer_is_guest>
89
+ <customer_dob><to_order>*</to_order></customer_dob>
90
+ <customer_taxvat><to_order>*</to_order></customer_taxvat>
91
+
92
+ <global_currency_code><to_order>*</to_order></global_currency_code>
93
+ <base_currency_code><to_order>*</to_order></base_currency_code>
94
+ <store_currency_code><to_order>*</to_order></store_currency_code>
95
+ <quote_currency_code><to_order>order_currency_code</to_order></quote_currency_code>
96
+ <store_to_base_rate><to_order>*</to_order></store_to_base_rate>
97
+ <store_to_quote_rate><to_order>store_to_order_rate</to_order></store_to_quote_rate>
98
+ <base_to_global_rate><to_order>*</to_order></base_to_global_rate>
99
+ <base_to_quote_rate><to_order>base_to_order_rate</to_order></base_to_quote_rate>
100
+
101
+ <coupon_code><to_order>*</to_order></coupon_code>
102
+ <giftcert_code><to_order>*</to_order></giftcert_code>
103
+ <is_virtual><to_order>*</to_order></is_virtual>
104
+ <is_multi_payment><to_order>*</to_order></is_multi_payment>
105
+ <applied_rule_ids><to_order>*</to_order></applied_rule_ids>
106
+ </sales_convert_quote>
107
+
108
+ <sales_convert_quote_address>
109
+ <weight><to_order>*</to_order></weight>
110
+ <shipping_method><to_order>*</to_order></shipping_method>
111
+ <shipping_description><to_order>*</to_order></shipping_description>
112
+ <shipping_rate><to_order>*</to_order></shipping_rate>
113
+
114
+ <subtotal><to_order>*</to_order></subtotal>
115
+ <tax_amount><to_order>*</to_order></tax_amount>
116
+ <tax_string><to_order>*</to_order></tax_string>
117
+ <discount_amount><to_order>*</to_order></discount_amount>
118
+ <shipping_amount><to_order>*</to_order></shipping_amount>
119
+ <shipping_tax_amount><to_order>*</to_order></shipping_tax_amount>
120
+ <giftcert_amount><to_order>*</to_order></giftcert_amount>
121
+ <custbalance_amount><to_order>*</to_order></custbalance_amount>
122
+ <grand_total><to_order>*</to_order></grand_total>
123
+
124
+ <base_subtotal><to_order>*</to_order></base_subtotal>
125
+ <base_tax_amount><to_order>*</to_order></base_tax_amount>
126
+ <base_discount_amount><to_order>*</to_order></base_discount_amount>
127
+ <base_shipping_amount><to_order>*</to_order></base_shipping_amount>
128
+ <base_shipping_tax_amount><to_order>*</to_order></base_shipping_tax_amount>
129
+ <base_giftcert_amount><to_order>*</to_order></base_giftcert_amount>
130
+ <base_custbalance_amount><to_order>*</to_order></base_custbalance_amount>
131
+ <base_grand_total><to_order>*</to_order></base_grand_total>
132
+
133
+ <prefix><to_order_address>*</to_order_address><to_customer_address>*</to_customer_address></prefix>
134
+ <firstname><to_order_address>*</to_order_address><to_customer_address>*</to_customer_address></firstname>
135
+ <middlename><to_order_address>*</to_order_address><to_customer_address>*</to_customer_address></middlename>
136
+ <lastname><to_order_address>*</to_order_address><to_customer_address>*</to_customer_address></lastname>
137
+ <suffix><to_order_address>*</to_order_address><to_customer_address>*</to_customer_address></suffix>
138
+ <company><to_order_address>*</to_order_address><to_customer_address>*</to_customer_address></company>
139
+ <street_full><to_order_address>street</to_order_address></street_full>
140
+ <street><to_customer_address>*</to_customer_address></street><!-- ^^^ ? -->
141
+ <city><to_order_address>*</to_order_address><to_customer_address>*</to_customer_address></city>
142
+ <region><to_order_address>*</to_order_address><to_customer_address>*</to_customer_address></region>
143
+ <region_id><to_order_address>*</to_order_address><to_customer_address>*</to_customer_address></region_id>
144
+ <postcode><to_order_address>*</to_order_address><to_customer_address>*</to_customer_address></postcode>
145
+ <country_id><to_order_address>*</to_order_address><to_customer_address>*</to_customer_address></country_id>
146
+ <telephone><to_order_address>*</to_order_address><to_customer_address>*</to_customer_address></telephone>
147
+ <fax><to_order_address>*</to_order_address><to_customer_address>*</to_customer_address></fax>
148
+ <email><to_customer_address>*</to_customer_address></email>
149
+ </sales_convert_quote_address>
150
+
151
+ <sales_convert_quote_payment>
152
+ <method><to_order_payment>*</to_order_payment></method>
153
+ <additional_data><to_order_payment>*</to_order_payment></additional_data>
154
+ <po_number><to_order_payment>*</to_order_payment></po_number>
155
+ <cc_type><to_order_payment>*</to_order_payment></cc_type>
156
+ <cc_number_enc><to_order_payment>*</to_order_payment></cc_number_enc>
157
+ <cc_last4><to_order_payment>*</to_order_payment></cc_last4>
158
+ <cc_owner><to_order_payment>*</to_order_payment></cc_owner>
159
+ <cc_exp_month><to_order_payment>*</to_order_payment></cc_exp_month>
160
+ <cc_exp_year><to_order_payment>*</to_order_payment></cc_exp_year>
161
+
162
+ <cc_number><to_order_payment>*</to_order_payment></cc_number>
163
+ <cc_cid><to_order_payment>*</to_order_payment></cc_cid>
164
+
165
+ <cc_ss_issue><to_order_payment>*</to_order_payment></cc_ss_issue>
166
+ <cc_ss_start_month><to_order_payment>*</to_order_payment></cc_ss_start_month>
167
+ <cc_ss_start_year><to_order_payment>*</to_order_payment></cc_ss_start_year>
168
+ </sales_convert_quote_payment>
169
+
170
+ <sales_convert_quote_item>
171
+ <sku><to_order_item>*</to_order_item></sku>
172
+ <name><to_order_item>*</to_order_item></name>
173
+ <description><to_order_item>*</to_order_item></description>
174
+ <weight><to_order_item>*</to_order_item></weight>
175
+ <is_qty_decimal><to_order_item>*</to_order_item></is_qty_decimal>
176
+ <qty><to_order_item>qty_ordered</to_order_item></qty>
177
+ <is_virtual><to_order_item>*</to_order_item></is_virtual>
178
+ <original_price><to_order_item>*</to_order_item></original_price>
179
+ <applied_rule_ids><to_order_item>*</to_order_item></applied_rule_ids>
180
+ <additional_data><to_order_item>*</to_order_item></additional_data>
181
+ <calculation_price><to_order_item>price</to_order_item></calculation_price>
182
+ <base_calculation_price><to_order_item>base_price</to_order_item></base_calculation_price>
183
+ <tax_percent><to_order_item>*</to_order_item></tax_percent>
184
+ <tax_amount><to_order_item>*</to_order_item></tax_amount>
185
+ <tax_before_discount><to_order_item>*</to_order_item></tax_before_discount>
186
+ <base_tax_before_discount><to_order_item>*</to_order_item></base_tax_before_discount>
187
+ <tax_string><to_order_item>*</to_order_item></tax_string>
188
+ <row_weight><to_order_item>*</to_order_item></row_weight>
189
+ <row_total><to_order_item>*</to_order_item></row_total>
190
+ <price><to_order_item>base_original_price</to_order_item></price>
191
+ <base_tax_amount><to_order_item>*</to_order_item></base_tax_amount>
192
+ <base_row_total><to_order_item>*</to_order_item></base_row_total>
193
+ <discount_percent><to_order_item_discount>*</to_order_item_discount></discount_percent>
194
+ <discount_amount><to_order_item_discount>*</to_order_item_discount></discount_amount>
195
+ <base_discount_amount><to_order_item_discount>*</to_order_item_discount></base_discount_amount>
196
+ </sales_convert_quote_item>
197
+
198
+ <sales_convert_order>
199
+ <customer_id><to_quote>*</to_quote></customer_id>
200
+ <customer_email><to_quote>*</to_quote></customer_email>
201
+ <customer_group_id><to_quote>*</to_quote></customer_group_id>
202
+ <customer_tax_class_id><to_quote>*</to_quote></customer_tax_class_id>
203
+ <customer_taxvat><to_quote>*</to_quote></customer_taxvat>
204
+
205
+ <customer_note><to_quote>*</to_quote></customer_note>
206
+ <customer_note_notify><to_quote>*</to_quote></customer_note_notify>
207
+ <customer_is_guest><to_quote>*</to_quote></customer_is_guest>
208
+
209
+ <global_currency_code><to_quote>*</to_quote><to_invoice>*</to_invoice><to_shipment>*</to_shipment><to_cm>*</to_cm></global_currency_code>
210
+ <base_currency_code><to_quote>*</to_quote><to_invoice>*</to_invoice><to_shipment>*</to_shipment><to_cm>*</to_cm></base_currency_code>
211
+ <store_currency_code><to_quote>*</to_quote><to_invoice>*</to_invoice><to_shipment>*</to_shipment><to_cm>*</to_cm></store_currency_code>
212
+ <order_currency_code><to_quote>quote_currency_code</to_quote><to_invoice>*</to_invoice><to_shipment>*</to_shipment><to_cm>*</to_cm></order_currency_code>
213
+ <store_to_base_rate><to_quote>*</to_quote><to_invoice>*</to_invoice><to_shipment>*</to_shipment><to_cm>*</to_cm></store_to_base_rate>
214
+ <store_to_order_rate><to_quote>store_to_quote_rate</to_quote><to_invoice>*</to_invoice><to_shipment>*</to_shipment><to_cm>*</to_cm></store_to_order_rate>
215
+ <base_to_global_rate><to_quote>*</to_quote><to_invoice>*</to_invoice><to_shipment>*</to_shipment><to_cm>*</to_cm></base_to_global_rate>
216
+ <base_to_order_rate><to_quote>base_to_quote_rate</to_quote><to_invoice>*</to_invoice><to_shipment>*</to_shipment><to_cm>*</to_cm></base_to_order_rate>
217
+
218
+ <grand_total><to_quote>*</to_quote><to_quote_address_shipping>*</to_quote_address_shipping></grand_total>
219
+ <base_grand_total><to_quote>*</to_quote><to_quote_address_shipping>*</to_quote_address_shipping></base_grand_total>
220
+
221
+ <coupon_code><to_quote>*</to_quote></coupon_code>
222
+ <giftcert_code><to_quote>*</to_quote></giftcert_code>
223
+ <applied_rule_ids><to_quote>*</to_quote></applied_rule_ids>
224
+
225
+ <weight><to_quote_address_shipping>*</to_quote_address_shipping></weight>
226
+ <shipping_method><to_quote_address_shipping>*</to_quote_address_shipping></shipping_method>
227
+ <shipping_description><to_quote_address_shipping>*</to_quote_address_shipping></shipping_description>
228
+ <shipping_rate><to_quote_address_shipping>*</to_quote_address_shipping></shipping_rate>
229
+
230
+ <subtotal><to_quote_address_shipping>*</to_quote_address_shipping></subtotal>
231
+ <tax_amount><to_quote_address_shipping>*</to_quote_address_shipping></tax_amount>
232
+ <tax_string><to_quote_address_shipping>*</to_quote_address_shipping></tax_string>
233
+ <discount_amount><to_quote_address_shipping>*</to_quote_address_shipping></discount_amount>
234
+ <shipping_amount><to_quote_address_shipping>*</to_quote_address_shipping></shipping_amount>
235
+ <giftcert_amount><to_quote_address_shipping>*</to_quote_address_shipping></giftcert_amount>
236
+ <custbalance_amount><to_quote_address_shipping>*</to_quote_address_shipping></custbalance_amount>
237
+
238
+ <base_subtotal><to_quote_address_shipping>*</to_quote_address_shipping></base_subtotal>
239
+ <base_tax_amount><to_quote_address_shipping>*</to_quote_address_shipping></base_tax_amount>
240
+ <base_discount_amount><to_quote_address_shipping>*</to_quote_address_shipping></base_discount_amount>
241
+ <base_shipping_amount><to_quote_address_shipping>*</to_quote_address_shipping></base_shipping_amount>
242
+ <base_giftcert_amount><to_quote_address_shipping>*</to_quote_address_shipping></base_giftcert_amount>
243
+ <base_custbalance_amount><to_quote_address_shipping>*</to_quote_address_shipping></base_custbalance_amount>
244
+
245
+ <shipping_tax_amount><to_cm>*</to_cm></shipping_tax_amount>
246
+ <base_shipping_tax_amount><to_cm>*</to_cm></base_shipping_tax_amount>
247
+
248
+ </sales_convert_order>
249
+
250
+ <sales_convert_order_address>
251
+ <prefix><to_quote_address>*</to_quote_address></prefix>
252
+ <firstname><to_quote_address>*</to_quote_address></firstname>
253
+ <middlename><to_quote_address>*</to_quote_address></middlename>
254
+ <lastname><to_quote_address>*</to_quote_address></lastname>
255
+ <suffix><to_quote_address>*</to_quote_address></suffix>
256
+ <company><to_quote_address>*</to_quote_address></company>
257
+ <street_full><to_quote_address>street</to_quote_address></street_full>
258
+ <city><to_quote_address>*</to_quote_address></city>
259
+ <region><to_quote_address>*</to_quote_address></region>
260
+ <region_id><to_quote_address>*</to_quote_address></region_id>
261
+ <postcode><to_quote_address>*</to_quote_address></postcode>
262
+ <country_id><to_quote_address>*</to_quote_address></country_id>
263
+ <telephone><to_quote_address>*</to_quote_address></telephone>
264
+ <fax><to_quote_address>*</to_quote_address></fax>
265
+ </sales_convert_order_address>
266
+
267
+ <sales_convert_order_payment>
268
+ <method><to_quote_payment>*</to_quote_payment></method>
269
+ <additional_data><to_quote_payment>*</to_quote_payment></additional_data>
270
+ <po_number><to_quote_payment>*</to_quote_payment></po_number>
271
+ <cc_type><to_quote_payment>*</to_quote_payment></cc_type>
272
+ <cc_number_enc><to_quote_payment>*</to_quote_payment></cc_number_enc>
273
+ <cc_last4><to_quote_payment>*</to_quote_payment></cc_last4>
274
+ <cc_owner><to_quote_payment>*</to_quote_payment></cc_owner>
275
+ <cc_exp_month><to_quote_payment>*</to_quote_payment></cc_exp_month>
276
+ <cc_exp_year><to_quote_payment>*</to_quote_payment></cc_exp_year>
277
+
278
+ <cc_ss_issue><to_quote_payment>*</to_quote_payment></cc_ss_issue>
279
+ <cc_ss_start_month><to_quote_payment>*</to_quote_payment></cc_ss_start_month>
280
+ <cc_ss_start_year><to_quote_payment>*</to_quote_payment></cc_ss_start_year>
281
+ </sales_convert_order_payment>
282
+
283
+ <sales_convert_order_item>
284
+ <sku><to_quote_item>*</to_quote_item><to_invoice_item>*</to_invoice_item><to_shipment_item>*</to_shipment_item><to_cm_item>*</to_cm_item></sku>
285
+ <name><to_quote_item>*</to_quote_item><to_invoice_item>*</to_invoice_item><to_shipment_item>*</to_shipment_item><to_cm_item>*</to_cm_item></name>
286
+ <description><to_quote_item>*</to_quote_item><to_invoice_item>*</to_invoice_item><to_shipment_item>*</to_shipment_item><to_cm_item>*</to_cm_item></description>
287
+ <weight><to_quote_item>*</to_quote_item><to_shipment_item>*</to_shipment_item></weight>
288
+ <price><to_quote_item>custom_price</to_quote_item><to_invoice_item>*</to_invoice_item><to_shipment_item>*</to_shipment_item><to_cm_item>*</to_cm_item></price>
289
+ <discount_percent><to_quote_item_discount>*</to_quote_item_discount></discount_percent>
290
+ <discount_amount><to_quote_item_discount>*</to_quote_item_discount></discount_amount>
291
+ <tax_percent><to_quote_item>*</to_quote_item></tax_percent>
292
+ <tax_string><to_quote_item>*</to_quote_item></tax_string>
293
+ <tax_amount><to_quote_item>*</to_quote_item></tax_amount>
294
+ <row_weight><to_quote_item>*</to_quote_item></row_weight>
295
+ <row_total><to_quote_item>*</to_quote_item></row_total>
296
+ <applied_rule_ids><to_quote_item>*</to_quote_item></applied_rule_ids>
297
+
298
+ <base_discount_amount><to_quote_item_discount>*</to_quote_item_discount></base_discount_amount>
299
+ <base_tax_amount><to_quote_item>*</to_quote_item></base_tax_amount>
300
+ <base_row_total><to_quote_item>*</to_quote_item></base_row_total>
301
+
302
+ <base_price><to_invoice_item>base_price</to_invoice_item><to_shipment_item>*</to_shipment_item><to_cm_item>*</to_cm_item></base_price>
303
+ <cost><to_invoice_item>cost</to_invoice_item><to_cm_item>*</to_cm_item></cost>
304
+ </sales_convert_order_item>
305
+
306
+ <customer_account>
307
+ <id><to_quote>customer_id</to_quote></id>
308
+ <email><to_quote>customer_email</to_quote></email>
309
+ <prefix><to_quote>customer_prefix</to_quote></prefix>
310
+ <firstname><to_quote>customer_firstname</to_quote></firstname>
311
+ <middlename><to_quote>customer_middlename</to_quote></middlename>
312
+ <lastname><to_quote>customer_lastname</to_quote></lastname>
313
+ <suffix><to_quote>customer_suffix</to_quote></suffix>
314
+ <group_id><to_quote>customer_group_id</to_quote></group_id>
315
+ <tax_class_id><to_quote>customer_tax_class_id</to_quote></tax_class_id>
316
+ <taxvat><to_quote>customer_taxvat</to_quote></taxvat>
317
+ <dob><to_quote>customer_dob</to_quote></dob>
318
+ </customer_account>
319
+
320
+ <customer_address>
321
+ <id><to_quote_address>customer_address_id</to_quote_address></id>
322
+ <parent_id><to_quote_address>customer_id</to_quote_address></parent_id>
323
+ <prefix><to_quote_address>*</to_quote_address></prefix>
324
+ <firstname><to_quote_address>*</to_quote_address></firstname>
325
+ <middlename><to_quote_address>*</to_quote_address></middlename>
326
+ <lastname><to_quote_address>*</to_quote_address></lastname>
327
+ <suffix><to_quote_address>*</to_quote_address></suffix>
328
+ <!--<email><to_quote_address>*</to_quote_address></email>-->
329
+ <company><to_quote_address>*</to_quote_address></company>
330
+ <street_full><to_quote_address>street</to_quote_address></street_full>
331
+ <city><to_quote_address>*</to_quote_address></city>
332
+ <region><to_quote_address>*</to_quote_address></region>
333
+ <region_id><to_quote_address>*</to_quote_address></region_id>
334
+ <postcode><to_quote_address>*</to_quote_address></postcode>
335
+ <country_id><to_quote_address>*</to_quote_address></country_id>
336
+ <telephone><to_quote_address>*</to_quote_address></telephone>
337
+ <fax><to_quote_address>*</to_quote_address></fax>
338
+ </customer_address>
339
+ </fieldsets>
340
+
341
+ <models>
342
+ <sales>
343
+ <class>Mage_Sales_Model</class>
344
+ <resourceModel>sales_mysql4</resourceModel>
345
+ </sales>
346
+ <sales_mysql4>
347
+ <class>Mage_Sales_Model_Mysql4</class>
348
+ <entities>
349
+ <quote><table>sales_flat_quote</table></quote>
350
+ <quote_item><table>sales_flat_quote_item</table></quote_item>
351
+ <quote_address><table>sales_flat_quote_address</table></quote_address>
352
+ <quote_address_item><table>sales_flat_quote_address_item</table></quote_address_item>
353
+ <quote_item_option><table>sales_flat_quote_item_option</table></quote_item_option>
354
+ <quote_payment><table>sales_flat_quote_payment</table></quote_payment>
355
+ <quote_address_shipping_rate><table>sales_flat_quote_shipping_rate</table></quote_address_shipping_rate>
356
+
357
+ <order><table>sales_order</table></order>
358
+ <order_tax><table>sales_order_tax</table></order_tax>
359
+ <order_item><table>sales_flat_order_item</table></order_item>
360
+ <order_item_option><table>sales_flat_order_item_option</table></order_item_option>
361
+ <order_entity><table>sales_order_entity</table></order_entity>
362
+ <!--order></order>
363
+
364
+ <invoice></invoice>
365
+
366
+ <shipment></shipment>
367
+
368
+ <creditmemo></creditmemo-->
369
+ </entities>
370
+ </sales_mysql4>
371
+ <sales_entity>
372
+ <class>Mage_Sales_Model_Entity</class>
373
+ <entities>
374
+ <quote><table>sales_quote</table></quote>
375
+ <quote_address><table>sales_quote_address</table></quote_address>
376
+ <quote_item><table>sales_quote_item</table></quote_item>
377
+ <quote_entity><table>sales_quote_entity</table></quote_entity>
378
+ <quote_temp><table>sales_quote_temp</table></quote_temp>
379
+ <order><table>sales_order</table></order>
380
+ <order_entity><table>sales_order_entity</table></order_entity>
381
+ </entities>
382
+ </sales_entity>
383
+ </models>
384
+ <template>
385
+ <email>
386
+ <sales_email_order_template translate="label" module="sales">
387
+ <label>New Order</label>
388
+ <file>sales/order_new.html</file>
389
+ <type>html</type>
390
+ </sales_email_order_template>
391
+ <sales_email_order_guest_template translate="label" module="sales">
392
+ <label>New Order for Guest</label>
393
+ <file>sales/order_new_guest.html</file>
394
+ <type>html</type>
395
+ </sales_email_order_guest_template>
396
+ <sales_email_order_comment_template translate="label" module="sales">
397
+ <label>Order Update</label>
398
+ <file>sales/order_update.html</file>
399
+ <type>html</type>
400
+ </sales_email_order_comment_template>
401
+ <sales_email_order_comment_guest_template translate="label" module="sales">
402
+ <label>Order Update for Guest</label>
403
+ <file>sales/order_update_guest.html</file>
404
+ <type>html</type>
405
+ </sales_email_order_comment_guest_template>
406
+ <sales_email_invoice_template translate="label" module="sales">
407
+ <label>New Invoice</label>
408
+ <file>sales/invoice_new.html</file>
409
+ <type>html</type>
410
+ </sales_email_invoice_template>
411
+ <sales_email_invoice_guest_template translate="label" module="sales">
412
+ <label>New Invoice for Guest</label>
413
+ <file>sales/invoice_new_guest.html</file>
414
+ <type>html</type>
415
+ </sales_email_invoice_guest_template>
416
+ <sales_email_invoice_comment_template translate="label" module="sales">
417
+ <label>Invoice Update</label>
418
+ <file>sales/invoice_update.html</file>
419
+ <type>html</type>
420
+ </sales_email_invoice_comment_template>
421
+ <sales_email_invoice_comment_guest_template translate="label" module="sales">
422
+ <label>Invoice Update for Guest</label>
423
+ <file>sales/invoice_update_guest.html</file>
424
+ <type>html</type>
425
+ </sales_email_invoice_comment_guest_template>
426
+ <sales_email_creditmemo_template translate="label" module="sales">
427
+ <label>New Credit Memo</label>
428
+ <file>sales/creditmemo_new.html</file>
429
+ <type>html</type>
430
+ </sales_email_creditmemo_template>
431
+ <sales_email_creditmemo_guest_template translate="label" module="sales">
432
+ <label>New Credit Memo for Guest</label>
433
+ <file>sales/creditmemo_new_guest.html</file>
434
+ <type>html</type>
435
+ </sales_email_creditmemo_guest_template>
436
+ <sales_email_creditmemo_comment_template translate="label" module="sales">
437
+ <label>Credit Memo Update</label>
438
+ <file>sales/creditmemo_update.html</file>
439
+ <type>html</type>
440
+ </sales_email_creditmemo_comment_template>
441
+ <sales_email_creditmemo_comment_guest_template translate="label" module="sales">
442
+ <label>Credit Memo Update for Guest</label>
443
+ <file>sales/creditmemo_update_guest.html</file>
444
+ <type>html</type>
445
+ </sales_email_creditmemo_comment_guest_template>
446
+ <sales_email_shipment_template translate="label" module="sales">
447
+ <label>New Shipment</label>
448
+ <file>sales/shipment_new.html</file>
449
+ <type>html</type>
450
+ </sales_email_shipment_template>
451
+ <sales_email_shipment_guest_template translate="label" module="sales">
452
+ <label>New Shipment for Guest</label>
453
+ <file>sales/shipment_new_guest.html</file>
454
+ <type>html</type>
455
+ </sales_email_shipment_guest_template>
456
+ <sales_email_shipment_comment_template translate="label" module="sales">
457
+ <label>Shipment Update</label>
458
+ <file>sales/shipment_update.html</file>
459
+ <type>html</type>
460
+ </sales_email_shipment_comment_template>
461
+ <sales_email_shipment_comment_guest_template translate="label" module="sales">
462
+ <label>Shipment Update for Guest</label>
463
+ <file>sales/shipment_update_guest.html</file>
464
+ <type>html</type>
465
+ </sales_email_shipment_comment_guest_template>
466
+ </email>
467
+ </template>
468
+ <resources>
469
+ <sales_setup>
470
+ <setup>
471
+ <module>Mage_Sales</module>
472
+ <class>Mage_Sales_Model_Mysql4_Setup</class>
473
+ </setup>
474
+ <connection><use>core_setup</use></connection>
475
+ </sales_setup>
476
+ <sales_write>
477
+ <connection><use>core_write</use></connection>
478
+ </sales_write>
479
+ <sales_read>
480
+ <connection><use>core_read</use></connection>
481
+ </sales_read>
482
+ </resources>
483
+ <blocks>
484
+ <sales><class>Mage_Sales_Block</class></sales>
485
+ </blocks>
486
+ <catalog>
487
+ <product>
488
+ <flat>
489
+ <attribute_nodes>
490
+ <sales_quote_item_product_collection>global/sales/quote/item/product_attributes</sales_quote_item_product_collection>
491
+ </attribute_nodes>
492
+ </flat>
493
+ </product>
494
+ </catalog>
495
+ <sales>
496
+ <quote>
497
+ <totals>
498
+ <subtotal>
499
+ <class>sales/quote_address_total_subtotal</class>
500
+ <before>grand_total</before>
501
+ </subtotal>
502
+ <discount>
503
+ <class>sales/quote_address_total_discount</class>
504
+ <after>subtotal</after>
505
+ <before>grand_total,shipping</before>
506
+ </discount>
507
+ <shipping>
508
+ <class>sales/quote_address_total_shipping</class>
509
+ <after>subtotal,discount</after>
510
+ <before>grand_total</before>
511
+ </shipping>
512
+ <tax>
513
+ <class>sales/quote_address_total_tax</class>
514
+ <after>subtotal,shipping</after>
515
+ <before>grand_total</before>
516
+ <renderer>checkout/total_tax</renderer>
517
+ <admin_renderer>adminhtml/sales_order_create_totals_tax</admin_renderer>
518
+ </tax>
519
+ <grand_total>
520
+ <class>sales/quote_address_total_grand</class>
521
+ <after>subtotal</after>
522
+ </grand_total>
523
+ </totals>
524
+ <item>
525
+ <product_attributes>
526
+ <sku/>
527
+ <type_id/>
528
+ <name/>
529
+ <status/>
530
+ <visibility/>
531
+ <price/>
532
+ <weight/>
533
+ <url_path/>
534
+ <url_key/>
535
+ <thumbnail/>
536
+ <small_image/>
537
+ <tax_class_id/>
538
+ <special_from_date/>
539
+ <special_to_date/>
540
+ <special_price/>
541
+ </product_attributes>
542
+ </item>
543
+ </quote>
544
+ <order>
545
+ <statuses>
546
+ <pending translate="label"><label>Pending</label></pending>
547
+ <pending_paypal translate="label"><label>Pending PayPal</label></pending_paypal>
548
+ <pending_worldnet translate="label"><label>Awaiting payment via WorldNet TPS</label></pending_worldnet>
549
+ <paid_worldnet translate="label"><label>Paid online</label></paid_worldnet>
550
+ <processing translate="label"><label>Processing</label></processing>
551
+ <holded translate="label"><label>On Hold</label></holded>
552
+ <complete translate="label"><label>Complete</label></complete>
553
+ <closed translate="label"><label>Closed</label></closed>
554
+ <canceled translate="label"><label>Canceled</label></canceled>
555
+ </statuses>
556
+ <states>
557
+ <new translate="label">
558
+ <label>New</label>
559
+ <statuses>
560
+ <pending_worldnet/>
561
+ <paid_worldnet/>
562
+ <pending/>
563
+ <processing/>
564
+ <holded/>
565
+ <complete/>
566
+ <canceled/>
567
+ </statuses>
568
+ <visible_on_front/>
569
+ </new>
570
+ <pending_payment translate="label">
571
+ <label>Pending Payment</label>
572
+ <statuses>
573
+ <pending_paypal/>
574
+ </statuses>
575
+ </pending_payment>
576
+ <pending_worldnet translate="label">
577
+ <label>Pending payment</label>
578
+ <statuses>
579
+ <pending_worldnet/>
580
+ </statuses>
581
+ </pending_worldnet>
582
+ <paid_worldnet translate="label">
583
+ <label>Paid online</label>
584
+ <statuses>
585
+ <paid_worldnet/>
586
+ </statuses>
587
+ </paid_worldnet>
588
+ <processing translate="label">
589
+ <label>Processing</label>
590
+ <statuses>
591
+ <processing/>
592
+ </statuses>
593
+ <visible_on_front/>
594
+ </processing>
595
+ <complete translate="label">
596
+ <label>Complete</label>
597
+ <statuses>
598
+ <complete/>
599
+ </statuses>
600
+ <visible_on_front/>
601
+ </complete>
602
+ <closed translate="label">
603
+ <label>Closed</label>
604
+ <statuses>
605
+ <closed/>
606
+ </statuses>
607
+ <visible_on_front/>
608
+ </closed>
609
+ <canceled translate="label">
610
+ <label>Canceled</label>
611
+ <statuses>
612
+ <canceled/>
613
+ </statuses>
614
+ <visible_on_front/>
615
+ </canceled>
616
+ <holded translate="label">
617
+ <label>On Hold</label>
618
+ <statuses>
619
+ <holded/>
620
+ </statuses>
621
+ <visible_on_front/>
622
+ </holded>
623
+ </states>
624
+ </order>
625
+ <order_invoice>
626
+ <totals>
627
+ <subtotal>
628
+ <class>sales/order_invoice_total_subtotal</class>
629
+ </subtotal>
630
+ <discount>
631
+ <class>sales/order_invoice_total_discount</class>
632
+ </discount>
633
+ <shipping>
634
+ <class>sales/order_invoice_total_shipping</class>
635
+ </shipping>
636
+ <tax>
637
+ <class>sales/order_invoice_total_tax</class>
638
+ </tax>
639
+ <grand_total>
640
+ <class>sales/order_invoice_total_grand</class>
641
+ </grand_total>
642
+ </totals>
643
+ </order_invoice>
644
+ <order_creditmemo>
645
+ <totals>
646
+ <subtotal>
647
+ <class>sales/order_creditmemo_total_subtotal</class>
648
+ </subtotal>
649
+ <tax>
650
+ <class>sales/order_creditmemo_total_tax</class>
651
+ </tax>
652
+ <discount>
653
+ <class>sales/order_creditmemo_total_discount</class>
654
+ </discount>
655
+ <grand_total>
656
+ <class>sales/order_creditmemo_total_grand</class>
657
+ </grand_total>
658
+ </totals>
659
+ </order_creditmemo>
660
+ </sales>
661
+ <pdf>
662
+ <invoice>
663
+ <default>sales/order_pdf_items_invoice_default</default>
664
+ <grouped>sales/order_pdf_items_invoice_grouped</grouped>
665
+ </invoice>
666
+ <shipment>
667
+ <default>sales/order_pdf_items_shipment_default</default>
668
+ </shipment>
669
+ <creditmemo>
670
+ <default>sales/order_pdf_items_creditmemo_default</default>
671
+ <grouped>sales/order_pdf_items_creditmemo_grouped</grouped>
672
+ </creditmemo>
673
+ </pdf>
674
+ </global>
675
+
676
+ <frontend>
677
+ <secure_url>
678
+ <sales>/sales/</sales>
679
+ </secure_url>
680
+ <routers>
681
+ <sales>
682
+ <use>standard</use>
683
+ <args>
684
+ <module>Mage_Sales</module>
685
+ <frontName>sales</frontName>
686
+ </args>
687
+ </sales>
688
+ </routers>
689
+ <translate>
690
+ <modules>
691
+ <Mage_Sales>
692
+ <files>
693
+ <default>Mage_Sales.csv</default>
694
+ </files>
695
+ </Mage_Sales>
696
+ </modules>
697
+ </translate>
698
+ <layout>
699
+ <updates>
700
+ <sales module="Mage_Sales">
701
+ <file>sales.xml</file>
702
+ </sales>
703
+ </updates>
704
+ </layout>
705
+ </frontend>
706
+ <adminhtml>
707
+ <menu>
708
+ <sales translate="title" module="sales">
709
+ <title>Sales</title>
710
+ <sort_order>20</sort_order>
711
+ <depends><module>Mage_Sales</module></depends>
712
+ <children>
713
+ <order translate="title" module="sales">
714
+ <title>Orders</title>
715
+ <action>adminhtml/sales_order</action>
716
+ <sort_order>10</sort_order>
717
+ </order>
718
+ <invoice translate="title" module="sales">
719
+ <title>Invoices</title>
720
+ <action>adminhtml/sales_invoice</action>
721
+ <sort_order>20</sort_order>
722
+ </invoice>
723
+ <shipment translate="title" module="sales">
724
+ <title>Shipments</title>
725
+ <action>adminhtml/sales_shipment</action>
726
+ <sort_order>30</sort_order>
727
+ </shipment>
728
+ <creditmemo translate="title" module="sales">
729
+ <title>Credit Memos</title>
730
+ <action>adminhtml/sales_creditmemo</action>
731
+ <sort_order>40</sort_order>
732
+ </creditmemo>
733
+ </children>
734
+ </sales>
735
+ </menu>
736
+ <acl>
737
+ <resources>
738
+ <admin>
739
+ <children>
740
+ <sales translate="title" module="sales">
741
+ <title>Sales</title>
742
+ <children>
743
+ <order translate="title">
744
+ <title>Orders</title>
745
+ <children>
746
+ <actions translate="title">
747
+ <title>Actions</title>
748
+ <children>
749
+ <create translate="title"><title>Create</title></create>
750
+ <view translate="title"><title>View</title></view>
751
+ <reorder translate="title"><title>Reorder</title></reorder>
752
+ <edit translate="title"><title>Edit</title></edit>
753
+ <cancel translate="title"><title>Cancel</title></cancel>
754
+ <capture translate="title"><title>Capture</title></capture>
755
+ <invoice translate="title"><title>Invoice</title></invoice>
756
+ <creditmemo translate="title"><title>Creditmemo</title></creditmemo>
757
+ <hold translate="title"><title>Hold</title></hold>
758
+ <unhold translate="title"><title>Unhold</title></unhold>
759
+ <ship translate="title"><title>Ship</title></ship>
760
+ <comment translate="title"><title>Comment</title></comment>
761
+ <reorder translate="title"><title>Reorder</title></reorder>
762
+ </children>
763
+ </actions>
764
+ </children>
765
+ <sort_order>10</sort_order>
766
+ </order>
767
+ <invoice translate="title">
768
+ <title>Invoices</title>
769
+ <sort_order>20</sort_order>
770
+ </invoice>
771
+ <shipment translate="title">
772
+ <title>Shipments</title>
773
+ <sort_order>30</sort_order>
774
+ </shipment>
775
+ <creditmemo translate="title">
776
+ <title>Credit Memos</title>
777
+ <sort_order>40</sort_order>
778
+ </creditmemo>
779
+ </children>
780
+ </sales>
781
+ <system>
782
+ <children>
783
+ <config>
784
+ <children>
785
+ <sales translate="title">
786
+ <title>Sales Section</title>
787
+ <sort_order>60</sort_order>
788
+ </sales>
789
+ <sales_email translate="title">
790
+ <title>Sales Emails Section</title>
791
+ <sort_order>65</sort_order>
792
+ </sales_email>
793
+ <sales_pdf translate="title">
794
+ <title>PDF Print-outs</title>
795
+ <sort_order>66</sort_order>
796
+ </sales_pdf>
797
+ </children>
798
+ </config>
799
+ </children>
800
+ </system>
801
+ </children>
802
+ </admin>
803
+ </resources>
804
+ </acl>
805
+ <translate>
806
+ <modules>
807
+ <Mage_Sales>
808
+ <files>
809
+ <default>Mage_Sales.csv</default>
810
+ </files>
811
+ </Mage_Sales>
812
+ </modules>
813
+ </translate>
814
+ <layout>
815
+ <updates>
816
+ <sales>
817
+ <file>sales.xml</file>
818
+ </sales>
819
+ </updates>
820
+ </layout>
821
+ <events>
822
+ <catalog_product_delete_before>
823
+ <observers>
824
+ <sales_quote_observer>
825
+ <type>singleton</type>
826
+ <class>sales/observer</class>
827
+ <method>substractQtyFromQuotes</method>
828
+ </sales_quote_observer>
829
+ </observers>
830
+ </catalog_product_delete_before>
831
+ <catalogrule_before_apply>
832
+ <observers>
833
+ <sales_quote_observer>
834
+ <type>singleton</type>
835
+ <class>sales/observer</class>
836
+ <method>markQuotesRecollectOnCatalogRules</method>
837
+ </sales_quote_observer>
838
+ </observers>
839
+ </catalogrule_before_apply>
840
+ <catalogrule_after_apply>
841
+ <observers>
842
+ <sales_quote_observer>
843
+ <type>singleton</type>
844
+ <class>sales/observer</class>
845
+ <method>markQuotesRecollectOnCatalogRules</method>
846
+ </sales_quote_observer>
847
+ </observers>
848
+ </catalogrule_after_apply>
849
+ <catalog_product_save_after>
850
+ <observers>
851
+ <sales_quote>
852
+ <type>singleton</type>
853
+ <class>sales/observer</class>
854
+ <method>catalogProductSaveAfter</method>
855
+ </sales_quote>
856
+ </observers>
857
+ </catalog_product_save_after>
858
+ <catalog_product_status_update>
859
+ <observers>
860
+ <sales_quote>
861
+ <type>singleton</type>
862
+ <class>sales/observer</class>
863
+ <method>catalogProductStatusUpdate</method>
864
+ </sales_quote>
865
+ </observers>
866
+ </catalog_product_status_update>
867
+ </events>
868
+ </adminhtml>
869
+
870
+ <default>
871
+ <payment>
872
+ <googlecheckout>
873
+ <active>1</active>
874
+ <model>googlecheckout/payment</model>
875
+ <title>Google Checkout</title>
876
+ </googlecheckout>
877
+ </payment>
878
+
879
+ <sales>
880
+ <totals_sort>
881
+ <discount>20</discount>
882
+ <grand_total>100</grand_total>
883
+ <shipping>30</shipping>
884
+ <subtotal>10</subtotal>
885
+ <tax>40</tax>
886
+ </totals_sort>
887
+ <reorder>
888
+ <allow>1</allow>
889
+ </reorder>
890
+ </sales>
891
+ <sales_email>
892
+ <order>
893
+ <enabled>1</enabled>
894
+ <template>sales_email_order_template</template>
895
+ <guest_template>sales_email_order_guest_template</guest_template>
896
+ <identity>sales</identity>
897
+ <copy_method>bcc</copy_method>
898
+ </order>
899
+ <order_comment>
900
+ <enabled>1</enabled>
901
+ <template>sales_email_order_comment_template</template>
902
+ <guest_template>sales_email_order_comment_guest_template</guest_template>
903
+ <identity>sales</identity>
904
+ <copy_method>bcc</copy_method>
905
+ </order_comment>
906
+ <invoice>
907
+ <enabled>1</enabled>
908
+ <template>sales_email_invoice_template</template>
909
+ <guest_template>sales_email_invoice_guest_template</guest_template>
910
+ <identity>sales</identity>
911
+ <copy_method>bcc</copy_method>
912
+ </invoice>
913
+ <invoice_comment>
914
+ <enabled>1</enabled>
915
+ <template>sales_email_invoice_comment_template</template>
916
+ <guest_template>sales_email_invoice_comment_guest_template</guest_template>
917
+ <identity>sales</identity>
918
+ <copy_method>bcc</copy_method>
919
+ </invoice_comment>
920
+ <shipment>
921
+ <enabled>1</enabled>
922
+ <template>sales_email_shipment_template</template>
923
+ <guest_template>sales_email_shipment_guest_template</guest_template>
924
+ <identity>sales</identity>
925
+ <copy_method>bcc</copy_method>
926
+ </shipment>
927
+ <shipment_comment>
928
+ <enabled>1</enabled>
929
+ <template>sales_email_shipment_comment_template</template>
930
+ <guest_template>sales_email_shipment_comment_guest_template</guest_template>
931
+ <identity>sales</identity>
932
+ <copy_method>bcc</copy_method>
933
+ </shipment_comment>
934
+ <creditmemo>
935
+ <enabled>1</enabled>
936
+ <template>sales_email_creditmemo_template</template>
937
+ <guest_template>sales_email_creditmemo_guest_template</guest_template>
938
+ <identity>sales</identity>
939
+ <copy_method>bcc</copy_method>
940
+ </creditmemo>
941
+ <creditmemo_comment>
942
+ <enabled>1</enabled>
943
+ <template>sales_email_creditmemo_comment_template</template>
944
+ <guest_template>sales_email_creditmemo_comment_guest_template</guest_template>
945
+ <identity>sales</identity>
946
+ <copy_method>bcc</copy_method>
947
+ </creditmemo_comment>
948
+ </sales_email>
949
+ <sales_pdf>
950
+ <invoice>
951
+ <put_order_id>1</put_order_id>
952
+ </invoice>
953
+ <shipment>
954
+ <put_order_id>1</put_order_id>
955
+ </shipment>
956
+ <creditmemo>
957
+ <put_order_id>1</put_order_id>
958
+ </creditmemo>
959
+ </sales_pdf>
960
+ </default>
961
+
962
+ <crontab>
963
+ <jobs>
964
+ <sales_clean_quotes>
965
+ <schedule><cron_expr>0 0 * * *</cron_expr></schedule>
966
+ <run><model>sales/observer::cleanExpiredQuotes</model></run>
967
+ </sales_clean_quotes>
968
+ </jobs>
969
+ </crontab>
970
+ </config>
app/code/core/Mage/Worldnet/Block/Standard/Failure.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Worldnet
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ /**
27
+ * Failure Response from Worldnet
28
+ *
29
+ * @category Mage
30
+ * @package Mage_Worldnet
31
+ * @name Mage_Worldnet_Block_Standard_Failure
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+
35
+ class Mage_Worldnet_Block_Standard_Failure extends Mage_Core_Block_Template
36
+ {
37
+
38
+ public function _construct()
39
+ {
40
+ $this->setTemplate('worldnet/standard/failure.phtml');
41
+ parent::_construct();
42
+ }
43
+ /**
44
+ * Return StatusDetail field value from Response
45
+ *
46
+ * @return string
47
+ */
48
+ public function getErrorMessage ()
49
+ {
50
+ $error = Mage::getSingleton('checkout/session')->getErrorMessage();
51
+ Mage::getSingleton('checkout/session')->unsErrorMessage();
52
+ return $error;
53
+ }
54
+
55
+ /**
56
+ * Get continue shopping url
57
+ */
58
+ public function getContinueShoppingUrl()
59
+ {
60
+ return Mage::getUrl('checkout/cart');
61
+ }
62
+ }
app/code/core/Mage/Worldnet/Block/Standard/Form.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Worldnet
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Form Block
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Worldnet
32
+ * @name Mage_Worldnet_Block_Standard_Form
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+
36
+ class Mage_Worldnet_Block_Standard_Form extends Mage_Payment_Block_Form
37
+ {
38
+ protected function _construct()
39
+ {
40
+ $this->setTemplate('worldnet/standard/form.phtml');
41
+ parent::_construct();
42
+ }
43
+ }
app/code/core/Mage/Worldnet/Block/Standard/Redirect.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Worldnet
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Redirect to Worldnet
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Worldnet
32
+ * @name Mage_Worldnet_Block_Standard_Redirect
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+
36
+ class Mage_Worldnet_Block_Standard_Redirect extends Mage_Core_Block_Abstract
37
+ {
38
+ protected function _toHtml()
39
+ {
40
+ $standard = Mage::getModel('worldnet/standard');
41
+ $form = new Varien_Data_Form();
42
+ $form->setAction($standard->getWorldnetUrl())
43
+ ->setId('worldnettps_checkout')
44
+ ->setName('worldnettps_checkout')
45
+ ->setMethod('POST')
46
+ ->setUseContainer(true);
47
+ foreach ($standard->setOrder($this->getOrder())->getStandardCheckoutFormFields() as $field => $value) {
48
+ $form->addField($field, 'hidden', array('name' => $field, 'value' => $value));
49
+ }
50
+ $html = '<html><body>';
51
+ $html.= $this->__('You will be redirected to WorldnetTPS in a few seconds.');
52
+ $html.= $form->toHtml();
53
+ $html.= '<script type="text/javascript">document.getElementById("worldnettps_checkout").submit();</script>';
54
+ $html.= '</body></html>';
55
+
56
+ return $html;
57
+ }
58
+ }
app/code/core/Mage/Worldnet/Helper/Data.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Worldnet
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Data Helper
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Worldnet
32
+ * @name Mage_Worldnet_Helper_Data
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+ class Mage_Worldnet_Helper_Data extends Mage_Core_Helper_Abstract
36
+ {
37
+
38
+ }
app/code/core/Mage/Worldnet/Model/Api/Debug.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Worldnet
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Api Debug
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Worldnet
32
+ * @name Mage_Worldnet_Model_Api_Debug
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+ class Mage_Worldnet_Model_Api_Debug extends Mage_Core_Model_Abstract
36
+ {
37
+ protected function _construct()
38
+ {
39
+ $this->_init('worldnet/api_debug');
40
+ }
41
+ }
app/code/core/Mage/Worldnet/Model/Config.php ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Worldnet
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ /**
27
+ * Worldnet Configuration Model
28
+ *
29
+ * @category Mage
30
+ * @package Mage_Worldnet
31
+ * @name Mage_Worldnet_Model_Config
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+
35
+ class Mage_Worldnet_Model_Config extends Varien_Object
36
+ {
37
+ const MODE_SIMULATOR = 'SIMULATOR';
38
+ const MODE_TEST = 'TEST';
39
+ const MODE_LIVE = 'LIVE';
40
+
41
+ const PAYMENT_TYPE_PAYMENT = 'PAYMENT';
42
+ const PAYMENT_TYPE_DEFERRED = 'DEFERRED';
43
+ const PAYMENT_TYPE_AUTHENTICATE = 'AUTHENTICATE';
44
+ const PAYMENT_TYPE_AUTHORISE = 'AUTHORISE';
45
+
46
+
47
+ /**
48
+ * Return config var
49
+ *
50
+ * @param string Var key
51
+ * @param string Default value for non-existing key
52
+ * @return mixed
53
+ */
54
+ public function getConfigData($key, $default=false)
55
+ {
56
+ if (!$this->hasData($key)) {
57
+ $value = Mage::getStoreConfig('payment/worldnet_standard/'.$key);
58
+ if (is_null($value) || false===$value) {
59
+ $value = $default;
60
+ }
61
+ $this->setData($key, $value);
62
+ }
63
+ return $this->getData($key);
64
+ }
65
+
66
+ /**
67
+ * Return Protocol version
68
+ *
69
+ * @return string Protocol version
70
+ */
71
+ public function getVersion ()
72
+ {
73
+ return '2.22';
74
+ }
75
+
76
+ /**
77
+ * Return Store description sent to Worldnet
78
+ *
79
+ * @return string Description
80
+ */
81
+ public function getDescription ()
82
+ {
83
+ return $this->getConfigData('description');
84
+ }
85
+
86
+ /**
87
+ * Return Worldnet registered merchant account name
88
+ *
89
+ * @return string Merchant account name
90
+ */
91
+ public function getVendorName ()
92
+ {
93
+ return $this->getConfigData('vendor_name');
94
+ }
95
+
96
+ /**
97
+ * Return Worldnet merchant password
98
+ *
99
+ * @return string Merchant password
100
+ */
101
+ public function getVendorPassword ()
102
+ {
103
+ return $this->getConfigData('vendor_password');
104
+ }
105
+
106
+ /**
107
+ * Return preferred payment type (see SELF::PAYMENT_TYPE_* constants)
108
+ *
109
+ * @return string payment type
110
+ */
111
+ public function getPaymentType ()
112
+ {
113
+ return $this->getConfigData('payment_action');
114
+ }
115
+
116
+ /**
117
+ * Return working mode (see SELF::MODE_* constants)
118
+ *
119
+ * @return string Working mode
120
+ */
121
+ public function getMode ()
122
+ {
123
+ return $this->getConfigData('mode');
124
+ }
125
+
126
+ /**
127
+ * Return new order status
128
+ *
129
+ * @return string New order status
130
+ */
131
+ public function getNewOrderStatus ()
132
+ {
133
+ return $this->getConfigData('order_status');
134
+ }
135
+
136
+ /**
137
+ * Return debug flag
138
+ *
139
+ * @return boolean Debug flag (0/1)
140
+ */
141
+ public function getDebug ()
142
+ {
143
+ return $this->getConfigData('debug_flag');
144
+ }
145
+
146
+ /**
147
+ * Return currency code
148
+ *
149
+ * @return 3 digit currency code
150
+ */
151
+ public function getCurrency ()
152
+ {
153
+ return $this->getConfigData('currency');
154
+ }
155
+
156
+ /**
157
+ * Return terminal id
158
+ *
159
+ * @return 3 digit currency code
160
+ */
161
+ public function getTerminalid ()
162
+ {
163
+ return $this->getConfigData('terminalid');
164
+ }
165
+
166
+ /**
167
+ * Return shared secret
168
+ *
169
+ * @return shared secret between worldnet & merchant
170
+ */
171
+ public function getSharedsecret ()
172
+ {
173
+ return $this->getConfigData('sharedsecret');
174
+ }
175
+
176
+ /**
177
+ * Return key for simple XOR crypt, using Vendor encrypted password by Worldnet
178
+ *
179
+ * @return string Key for simple XOR crypt
180
+ */
181
+ public function getCryptKey ()
182
+ {
183
+ return $this->getVendorPassword();
184
+ }
185
+ }
app/code/core/Mage/Worldnet/Model/Mysql4/Api/Debug.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ h<?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Worldnet
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Worldnet API Debug Resource
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Worldnet
32
+ * @name Mage_Worldnet_Model_Mysql4_Api_Debug
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+
36
+ class Mage_Worldnet_Model_Mysql4_Api_Debug extends Mage_Core_Model_Mysql4_Abstract
37
+ {
38
+ protected function _construct()
39
+ {
40
+ $this->_init('worldnet/api_debug', 'transaction_id');
41
+ }
42
+ }
app/code/core/Mage/Worldnet/Model/Mysql4/Api/Debug/Collection.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Worldnet
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Worldnet API Debug Resource Collection
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Worldnet
32
+ * @name Mage_Worldnet_Model_Mysql4_Api_Debug_Collection
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+ class Mage_Worldnet_Model_Mysql4_Api_Debug_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
36
+ {
37
+ protected function _construct()
38
+ {
39
+ $this->_init('worldnet/api_debug');
40
+ }
41
+ }
app/code/core/Mage/Worldnet/Model/Mysql4/Setup.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Worldnet
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Setup model
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Worldnet
32
+ * @name Mage_Worldnet_Model_Mysql4_Setup
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+
36
+ class Mage_Worldnet_Model_Mysql4_Setup extends Mage_Sales_Model_Mysql4_Setup
37
+ {
38
+
39
+ }
app/code/core/Mage/Worldnet/Model/Session.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_PackageName
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Worldnet Session Model
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Worldnet
32
+ * @name Mage_Worldnet_Model_Session
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+
36
+ class Mage_Worldnet_Model_Session extends Mage_Core_Model_Session_Abstract
37
+ {
38
+ public function __construct()
39
+ {
40
+ $this->init('worldnet');
41
+ }
42
+ }
app/code/core/Mage/Worldnet/Model/Source/CurrencyAction.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Worldnet
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Worldnet Modes Resource
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Worldnet
32
+ * @name Mage_Worldnet_Model_Source_ModeAction
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+
36
+ class Mage_Worldnet_Model_Source_CurrencyAction
37
+ {
38
+ public function toOptionArray()
39
+ {
40
+ return array(
41
+ array('value' => 'EUR', 'label' => Mage::helper('worldnet')->__('EUR')),
42
+ array('value' => 'GBP', 'label' => Mage::helper('worldnet')->__('GBP')),
43
+ array('value' => 'USD', 'label' => Mage::helper('worldnet')->__('USD')),
44
+ );
45
+ }
46
+ }
47
+
48
+
49
+
app/code/core/Mage/Worldnet/Model/Source/ModeAction.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Worldnet
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Worldnet Modes Resource
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Worldnet
32
+ * @name Mage_Worldnet_Model_Source_ModeAction
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+
36
+ class Mage_Worldnet_Model_Source_ModeAction
37
+ {
38
+ public function toOptionArray()
39
+ {
40
+ return array(
41
+ array('value' => Mage_Worldnet_Model_Config::MODE_TEST, 'label' => Mage::helper('worldnet')->__('Test')),
42
+ array('value' => Mage_Worldnet_Model_Config::MODE_LIVE, 'label' => Mage::helper('worldnet')->__('Live')),
43
+ );
44
+ }
45
+ }
46
+
47
+
48
+
app/code/core/Mage/Worldnet/Model/Source/PaymentAction.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Worldnet
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Worldnet Payment Actions Resource
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Worldnet
32
+ * @name Mage_Worldnet_Model_Source_PaymentAction
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+
36
+ class Mage_Worldnet_Model_Source_PaymentAction
37
+ {
38
+ public function toOptionArray()
39
+ {
40
+ return array(
41
+ array('value' => Mage_Worldnet_Model_Config::PAYMENT_TYPE_PAYMENT, 'label' => Mage::helper('worldnet')->__('PAYMENT')),
42
+ );
43
+ }
44
+ }
app/code/core/Mage/Worldnet/Model/Standard.php ADDED
@@ -0,0 +1,465 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Worldnet
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Worldnet Form Model
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Worldnet
32
+ * @name Mage_Worldnet_Model_Standard
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+ class Mage_Worldnet_Model_Standard extends Mage_Payment_Model_Method_Abstract
36
+ {
37
+ protected $_code = 'worldnet_standard';
38
+ protected $_formBlockType = 'worldnet/standard_form';
39
+
40
+ protected $_isGateway = false;
41
+ protected $_canAuthorize = true;
42
+ protected $_canCapture = true;
43
+ protected $_canCapturePartial = false;
44
+ protected $_canRefund = false;
45
+ protected $_canVoid = false;
46
+ protected $_canUseInternal = false;
47
+ protected $_canUseCheckout = true;
48
+ protected $_canUseForMultishipping = false;
49
+
50
+ protected $_order = null;
51
+
52
+
53
+ /**
54
+ * Get Config model
55
+ *
56
+ * @return object Mage_Worldnet_Model_Config
57
+ */
58
+ public function getConfig()
59
+ {
60
+ return Mage::getSingleton('worldnet/config');
61
+ }
62
+
63
+ /**
64
+ * Return debug flag
65
+ *
66
+ * @return boolean
67
+ */
68
+ public function getDebug ()
69
+ {
70
+ return $this->getConfig()->getDebug();
71
+ }
72
+
73
+ /**
74
+ * Returns Target URL
75
+ *
76
+ * @return string Target URL
77
+ */
78
+ public function getWorldnetUrl ()
79
+ {
80
+ switch ($this->getConfig()->getMode()) {
81
+ case Mage_Worldnet_Model_Config::MODE_LIVE:
82
+ $url = 'https://payments.worldnettps.com/merchant/paymentpage';
83
+ break;
84
+ case Mage_Worldnet_Model_Config::MODE_TEST:
85
+ $url = 'https://testpayments.worldnettps.com/merchant/paymentpage';
86
+ break;
87
+ default: // simulator mode
88
+ $url = 'https://testpayments.worldnettps.com/merchant/paymentpage';
89
+ break;
90
+ }
91
+ return $url;
92
+ }
93
+
94
+ /**
95
+ * Return URL for Worldnet success response
96
+ *
97
+ * @return string URL
98
+ */
99
+ protected function getSuccessURL ()
100
+ {
101
+ return Mage::getUrl('worldnet/standard/successresponse');
102
+ }
103
+
104
+ /**
105
+ * Return URL for Worldnet failure response
106
+ *
107
+ * @return string URL
108
+ */
109
+ protected function getFailureURL ()
110
+ {
111
+ return Mage::getUrl('worldnet/standard/failureresponse');
112
+ }
113
+
114
+ /**
115
+ * Transaction unique ID sent to Worldnet and sent back by Worldnet for order restore
116
+ * Using created order ID
117
+ *
118
+ * @return string Transaction unique number
119
+ */
120
+ protected function getVendorTxCode ()
121
+ {
122
+ return $this->getOrder()->getRealOrderId();
123
+ }
124
+
125
+ /**
126
+ * Returns cart formatted
127
+ * String format:
128
+ * Number of lines:Name1:Quantity1:CostNoTax1:Tax1:CostTax1:Total1:Name2:Quantity2:CostNoTax2...
129
+ *
130
+ * @return string Formatted cart items
131
+ */
132
+ protected function getFormattedCart ()
133
+ {
134
+ $items = $this->getOrder()->getAllItems();
135
+ $resultParts = array();
136
+ $totalLines = 0;
137
+ if ($items) {
138
+ foreach($items as $item) {
139
+ if ($item->getParentItem()) {
140
+ continue;
141
+ }
142
+ $quantity = $item->getQtyOrdered();
143
+
144
+ $cost = sprintf('%.2f', $item->getBasePrice() - $item->getBaseDiscountAmount());
145
+ $tax = sprintf('%.2f', $item->getBaseTaxAmount());
146
+ $costPlusTax = sprintf('%.2f', $cost + $tax/$quantity);
147
+
148
+ $totalCostPlusTax = sprintf('%.2f', $quantity * $cost + $tax);
149
+
150
+ $resultParts[] = str_replace(':', ' ', $item->getName());
151
+ $resultParts[] = $quantity;
152
+ $resultParts[] = $cost;
153
+ $resultParts[] = $tax;
154
+ $resultParts[] = $costPlusTax;
155
+ $resultParts[] = $totalCostPlusTax;
156
+ $totalLines++; //counting actual formatted items
157
+ }
158
+ }
159
+
160
+ // add delivery
161
+ $shipping = $this->getOrder()->getBaseShippingAmount();
162
+ if ((int)$shipping > 0) {
163
+ $totalLines++;
164
+ $resultParts = array_merge($resultParts, array('Shipping','','','','',sprintf('%.2f', $shipping)));
165
+ }
166
+
167
+ $result = $totalLines . ':' . implode(':', $resultParts);
168
+ return $result;
169
+ }
170
+
171
+ /**
172
+ * Format Crypted string with all order data for request to Worldnet
173
+ *
174
+ * @return string Crypted string
175
+ */
176
+ protected function getCrypted ()
177
+ {
178
+ $order = $this->getOrder();
179
+ if (!($order instanceof Mage_Sales_Model_Order)) {
180
+ Mage::throwException($this->_getHelper()->__('Cannot retrieve order object'));
181
+ }
182
+
183
+ $shipping = $order->getShippingAddress();
184
+ $billing = $order->getBillingAddress();
185
+
186
+ $amount = $order->getBaseGrandTotal();
187
+
188
+ $currency = $order->getBaseCurrencyCode();
189
+
190
+ $queryPairs = array();
191
+
192
+ $transactionId = $this->getVendorTxCode();
193
+ $queryPairs['VendorTxCode'] = $transactionId;
194
+
195
+
196
+ $queryPairs['Amount'] = sprintf('%.2f', $amount);
197
+ $queryPairs['Currency'] = $currency;
198
+
199
+ // Up to 100 chars of free format description
200
+ $description = $this->getConfig()->getDescription() != ''
201
+ ? $this->getConfig()->getDescription()
202
+ : Mage::app()->getStore()->getName() . ' ' . ' payment';
203
+ $queryPairs['Description'] = $description;
204
+
205
+ $queryPairs['SuccessURL'] = $this->getSuccessURL();
206
+ $queryPairs['FailureURL'] = $this->getFailureURL();
207
+
208
+ $queryPairs['CustomerName'] = $billing->getFirstname().' '.$billing->getLastname();
209
+ $queryPairs['CustomerEMail'] = $order->getCustomerEmail();
210
+ $queryPairs['ContactNumber'] = $billing->getTelephone();
211
+ $queryPairs['ContactFax'] = $billing->getFax();
212
+
213
+ $queryPairs['VendorEMail'] = '';
214
+ $queryPairs['eMailMessage'] = '';
215
+
216
+ $queryPairs['BillingAddress'] = $billing->format('oneline');
217
+ $queryPairs['BillingPostCode'] = $billing->getPostcode();
218
+
219
+ if ($shipping) {
220
+ $queryPairs['DeliveryAddress'] = $shipping->getFormated();
221
+ $queryPairs['DeliveryPostCode'] = $shipping->getPostcode();
222
+ } else {
223
+ $queryPairs['DeliveryAddress'] = '';
224
+ $queryPairs['DeliveryPostCode'] = '';
225
+ }
226
+
227
+ $queryPairs['Basket'] = $this->getFormattedCart();
228
+
229
+ // For charities registered for Gift Aid
230
+ $queryPairs['AllowGiftAid'] = '0';
231
+
232
+ /**
233
+ * Allow fine control over AVS/CV2 checks and rules by changing this value. 0 is Default
234
+ * It can be changed dynamically, per transaction, if you wish. See the VSP Server Protocol document
235
+ */
236
+ if ($this->getConfig()->getPaymentType() !== Mage_Worldnet_Model_Config::PAYMENT_TYPE_AUTHENTICATE) {
237
+ $queryPairs['ApplyAVSCV2'] = '0';
238
+ }
239
+
240
+ /**
241
+ * Allow fine control over 3D-Secure checks and rules by changing this value. 0 is Default
242
+ * It can be changed dynamically, per transaction, if you wish. See the VSP Server Protocol document
243
+ */
244
+ $queryPairs['Apply3DSecure'] = '0';
245
+
246
+ if ($this->getDebug()) {
247
+ Mage::getModel('worldnet/api_debug')
248
+ ->setRequestBody($this->getWorldnetUrl()."\n".print_r($queryPairs,1))
249
+ ->save();
250
+ }
251
+
252
+ // Encrypt the plaintext string for inclusion in the hidden field
253
+ $result = $this->arrayToCrypt($queryPairs);
254
+ return $result;
255
+ }
256
+
257
+ /**
258
+ * Form block description
259
+ *
260
+ * @return object
261
+ */
262
+ public function createFormBlock($name)
263
+ {
264
+ $block = $this->getLayout()->createBlock('worldnet/form_standard', $name);
265
+ $block->setMethod($this->_code);
266
+ $block->setPayment($this->getPayment());
267
+ return $block;
268
+ }
269
+
270
+ /**
271
+ * Return Order Place Redirect URL
272
+ *
273
+ * @return string Order Redirect URL
274
+ */
275
+ public function getOrderPlaceRedirectUrl()
276
+ {
277
+ return Mage::getUrl('worldnet/standard/redirect');
278
+ }
279
+
280
+ /**
281
+ * Return encrypted string with simple XOR algorithm
282
+ *
283
+ * @param string String to be encrypted
284
+ * @return string Encrypted string
285
+ */
286
+ protected function simpleXOR ($string)
287
+ {
288
+ $result = '';
289
+ $cryptKey = $this->getConfig()->getCryptKey();
290
+
291
+ if (!$cryptKey) {
292
+ return $string;
293
+ }
294
+
295
+ // Initialise key array
296
+ $keyList = array();
297
+
298
+ // Convert $cryptKey into array of ASCII values
299
+ for($i = 0; $i < strlen($cryptKey); $i++){
300
+ $keyList[$i] = ord(substr($cryptKey, $i, 1));
301
+ }
302
+
303
+ // Step through string a character at a time
304
+ for($i = 0; $i < strlen($string); $i++) {
305
+ /**
306
+ * Get ASCII code from string, get ASCII code from key (loop through with MOD),
307
+ * XOR the two, get the character from the result
308
+ * % is MOD (modulus), ^ is XOR
309
+ */
310
+ $result .= chr(ord(substr($string, $i, 1)) ^ ($keyList[$i % strlen($cryptKey)]));
311
+ }
312
+ return $result;
313
+ }
314
+
315
+ /**
316
+ * Extract possible response values into array from query string
317
+ *
318
+ * @param string Query string i.e. var1=value1&var2=value3...
319
+ * @return array
320
+ */
321
+ protected function getToken($queryString) {
322
+
323
+ // List the possible tokens
324
+ $Tokens = array(
325
+ "Status",
326
+ "StatusDetail",
327
+ "VendorTxCode",
328
+ "VPSTxId",
329
+ "TxAuthNo",
330
+ "Amount",
331
+ "AVSCV2",
332
+ "AddressResult",
333
+ "PostCodeResult",
334
+ "CV2Result",
335
+ "GiftAid",
336
+ "3DSecureStatus",
337
+ "CAVV"
338
+ );
339
+
340
+ // Initialise arrays
341
+ $output = array();
342
+ $resultArray = array();
343
+
344
+ // Get the next token in the sequence
345
+ $c = count($Tokens);
346
+ for ($i = $c - 1; $i >= 0 ; $i--){
347
+ // Find the position in the string
348
+ $start = strpos($queryString, $Tokens[$i]);
349
+ // If it's present
350
+ if ($start !== false){
351
+ // Record position and token name
352
+ $resultArray[$i]['start'] = $start;
353
+ $resultArray[$i]['token'] = $Tokens[$i];
354
+ }
355
+ }
356
+
357
+ // Sort in order of position
358
+ sort($resultArray);
359
+
360
+ // Go through the result array, getting the token values
361
+ $c = count($resultArray);
362
+ for ($i = 0; $i < $c; $i++){
363
+ // Get the start point of the value
364
+ $valueStart = $resultArray[$i]['start'] + strlen($resultArray[$i]['token']) + 1;
365
+ // Get the length of the value
366
+ if ($i == $c-1) {
367
+ $output[$resultArray[$i]['token']] = substr($queryString, $valueStart);
368
+ } else {
369
+ $valueLength = $resultArray[$i+1]['start'] - $resultArray[$i]['start'] - strlen($resultArray[$i]['token']) - 2;
370
+ $output[$resultArray[$i]['token']] = substr($queryString, $valueStart, $valueLength);
371
+ }
372
+
373
+ }
374
+
375
+ return $output;
376
+ }
377
+
378
+ /**
379
+ * Convert array (key => value, key => value, ...) to crypt string
380
+ *
381
+ * @param array Array to be converted
382
+ * @return string Crypt string
383
+ */
384
+ public function arrayToCrypt ($array)
385
+ {
386
+ $parts = array();
387
+ if (is_array($array)) {
388
+ foreach ($array as $k => $v) {
389
+ $parts[] = $k . '=' . $v;
390
+ }
391
+ }
392
+ $result = implode('&', $parts);
393
+ $result = $this->simpleXOR($result);
394
+ $result = $this->base64Encode($result);
395
+ return $result;
396
+ }
397
+
398
+ /**
399
+ * Reverse arrayToCrypt
400
+ *
401
+ * @param string Crypt string
402
+ * @return array
403
+ */
404
+ public function cryptToArray ($crypted)
405
+ {
406
+ $decoded = $this->base64Decode($crypted);
407
+ $uncrypted = $this->simpleXOR($decoded);
408
+ $tokens = $this->getToken($uncrypted);
409
+ return $tokens;
410
+ }
411
+
412
+ /**
413
+ * Custom base64_encode()
414
+ *
415
+ * @param String
416
+ * @return String
417
+ */
418
+ protected function base64Encode($plain)
419
+ {
420
+ return base64_encode($plain);
421
+ }
422
+
423
+ /**
424
+ * Custom base64_decode()
425
+ *
426
+ * @param String
427
+ * @return String
428
+ */
429
+ protected function base64Decode($scrambled)
430
+ {
431
+ // Fix plus to space conversion issue
432
+ $scrambled = str_replace(" ","+",$scrambled);
433
+ return base64_decode($scrambled);
434
+ }
435
+
436
+ /**
437
+ * Return Standard Checkout Form Fields for request to WorldnetTPS
438
+ *
439
+ * @return array Array of hidden form fields
440
+ */
441
+ public function getStandardCheckoutFormFields ()
442
+ {
443
+ $order = $this->getOrder();
444
+ if (!($order instanceof Mage_Sales_Model_Order)) {
445
+ Mage::throwException($this->_getHelper()->__('Cannot retrieve order object'));
446
+ }
447
+ $session = Mage::getSingleton('checkout/session');
448
+
449
+ $terminalid = $this->getConfig()->getTerminalid();
450
+ $orderid = $session->getQuoteId();
451
+ $amount = $order->getBaseGrandTotal();
452
+ $datetime = date("d-m-y:H:i:s:000");
453
+ $sharedsecret = $this->getConfig()->getSharedsecret();
454
+
455
+ $fields = array(
456
+ 'TERMINALID' => $terminalid,
457
+ 'ORDERID' => $orderid,
458
+ 'CURRENCY' => $this->getConfig()->getCurrency(),
459
+ 'AMOUNT' => sprintf('%.2f', $amount),
460
+ 'DATETIME' => $datetime,
461
+ 'HASH' => md5($terminalid.$orderid.sprintf('%.2f', $amount).$datetime.$sharedsecret)
462
+ );
463
+ return $fields;
464
+ }
465
+ }
app/code/core/Mage/Worldnet/controllers/StandardController.php ADDED
@@ -0,0 +1,275 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Worldnet
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * WorldnetTPS Form Method Front Controller
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Worldnet
32
+ * @name Mage_Worldnet_StandardController
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+ class Mage_Worldnet_StandardController extends Mage_Core_Controller_Front_Action
36
+ {
37
+ public $isValidResponse = false;
38
+
39
+ /**
40
+ * Get singleton with worldnet strandard
41
+ *
42
+ * @return object Mage_Worldnet_Model_Standard
43
+ */
44
+ public function getStandard()
45
+ {
46
+ return Mage::getSingleton('worldnet/standard');
47
+ }
48
+
49
+ /**
50
+ * Get Config model
51
+ *
52
+ * @return object Mage_Worldnet_Model_Config
53
+ */
54
+ public function getConfig()
55
+ {
56
+ return $this->getStandard()->getConfig();
57
+ }
58
+
59
+ /**
60
+ * Return debug flag
61
+ *
62
+ * @return boolean
63
+ */
64
+ public function getDebug ()
65
+ {
66
+ return $this->getStandard()->getDebug();
67
+ }
68
+
69
+ /**
70
+ * When a customer chooses Worldnet on Checkout/Payment page
71
+ *
72
+ */
73
+ public function redirectAction()
74
+ {
75
+ $session = Mage::getSingleton('checkout/session');
76
+ $session->setWorldnetStandardQuoteId($session->getQuoteId());
77
+
78
+ $order = Mage::getModel('sales/order');
79
+ $order->loadByIncrementId($session->getLastRealOrderId());
80
+ $order->addStatusToHistory(
81
+ $order->getStatus(),
82
+ Mage::helper('worldnet')->__('Customer was redirected to WorldnetTPS')
83
+ );
84
+ $order->save();
85
+
86
+ $this->getResponse()
87
+ ->setBody($this->getLayout()
88
+ ->createBlock('worldnet/standard_redirect')
89
+ ->setOrder($order)
90
+ ->toHtml());
91
+
92
+ $session->unsQuoteId();
93
+ }
94
+
95
+ /**
96
+ * Success response from Worldnet
97
+ *
98
+ * @return void
99
+ */
100
+ public function successResponseAction()
101
+ {
102
+ $session = Mage::getSingleton('checkout/session');
103
+ $session->setQuoteId($session->getWorldnetStandardQuoteId(true));
104
+
105
+ $wnOrderId = $this->getRequest()->ORDERID;
106
+ $wnApprovalCode = $this->getRequest()->APPROVALCODE;
107
+ $wnResponseCode = $this->getRequest()->RESPONSECODE;
108
+ $wnResponseText = $this->getRequest()->RESPONSETEXT;
109
+ $wnDateTime = $this->getRequest()->DATETIME;
110
+ $wnHash = $this->getRequest()->HASH;
111
+
112
+ $order = Mage::getModel('sales/order');
113
+
114
+ Mage::log("Session Order ID : ".$session->getLastRealOrderId());
115
+ Mage::log("Worldnet Order ID : ".$wnOrderId);
116
+ $order->loadByIncrementId($session->getLastRealOrderId());
117
+
118
+ if (!$order->getId()) {
119
+ Mage::log('No order found.');
120
+ /*
121
+ * need to have logic when there is no order with the order id from WorldnetTPS
122
+ */
123
+ return false;
124
+ }
125
+ Mage::log('Order Found');
126
+ if($wnResponseCode == 'A'){
127
+ $order->addStatusToHistory(
128
+ $order->getStatus(),
129
+ Mage::helper('worldnet')->__('Worldnet TPS: Transaction Authorised.')
130
+ );
131
+
132
+ $order->setStatus("paid_worldnet");
133
+ $order->sendNewOrderEmail();
134
+ $order->getPayment()->setTransactionId($wnOrderId);
135
+
136
+ $this->saveInvoice($order);
137
+ $order->save();
138
+
139
+ $session = Mage::getSingleton('checkout/session');
140
+ $session->setQuoteId($wnOrderId);
141
+ Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();
142
+ $this->_redirect('checkout/onepage/success');
143
+ }
144
+ else{
145
+ $session = Mage::getSingleton('checkout/session');
146
+ $session->setQuoteId($session->getWorldnetStandardQuoteId(true));
147
+
148
+ if($wnResponseCode == 'R') $order->addStatusToHistory($order->getStatus(), Mage::helper('worldnet')->__("Worldnet TPS: Transaction Authorised. TRANSACTION REFERRED."));
149
+ else $order->addStatusToHistory($order->getStatus(), Mage::helper('worldnet')->__("Worldnet TPS: Transaction Authorised. TRANSACTION DECLINED."));
150
+
151
+ $session->setErrorMessage("Transaction was not authorised by your Issuer.<br /><br />Response Text : ".$wnResponseText."<br />Response Code :".$wnResponseCode);
152
+ // cancel order in anyway
153
+ $order->cancel();
154
+ $order->save();
155
+
156
+ $this->_redirect('worldnet/standard/failure');
157
+ }
158
+ }
159
+
160
+ /**
161
+ * Save invoice for order
162
+ *
163
+ * @param Mage_Sales_Model_Order $order
164
+ * @return boolean Can save invoice or not
165
+ */
166
+ protected function saveInvoice (Mage_Sales_Model_Order $order)
167
+ {
168
+ if ($order->canInvoice()) {
169
+ $invoice = $order->prepareInvoice();
170
+
171
+ $invoice->register()->capture();
172
+ Mage::getModel('core/resource_transaction')
173
+ ->addObject($invoice)
174
+ ->addObject($invoice->getOrder())
175
+ ->save();
176
+ return true;
177
+ }
178
+
179
+ return false;
180
+ }
181
+
182
+ /**
183
+ * Failure response from Worldnet
184
+ *
185
+ * @return void
186
+ */
187
+ public function failureResponseAction ()
188
+ {
189
+ $this->preResponse();
190
+
191
+ if (!$this->isValidResponse) {
192
+ $this->_redirect('');
193
+ return ;
194
+ }
195
+
196
+ $transactionId = $this->responseArr['VendorTxCode'];
197
+
198
+ if ($this->getDebug()) {
199
+ Mage::getModel('worldnet/api_debug')
200
+ ->setResponseBody(print_r($this->responseArr,1))
201
+ ->save();
202
+ }
203
+
204
+ $order = Mage::getModel('sales/order');
205
+ $order->loadByIncrementId($transactionId);
206
+
207
+ if (!$order->getId()) {
208
+ /**
209
+ * need to have logic when there is no order with the order id from Worldnet
210
+ */
211
+ return false;
212
+ }
213
+
214
+ // cancel order in anyway
215
+ $order->cancel();
216
+
217
+ $session = Mage::getSingleton('checkout/session');
218
+ $session->setQuoteId($session->getWorldnetStandardQuoteId(true));
219
+
220
+ // Customer clicked CANCEL Butoon
221
+ if ($this->responseArr['Status'] == 'ABORT') {
222
+ $history = Mage::helper('worldnet')->__('Order '.$order->getId().' was canceled by customer');
223
+ $redirectTo = 'checkout/cart';
224
+ } else {
225
+ $history = Mage::helper('worldnet')->__($this->responseArr['StatusDetail']);
226
+ $session->setErrorMessage($this->responseArr['StatusDetail']);
227
+ $redirectTo = 'worldnet/standard/failure';
228
+ }
229
+
230
+ $history = Mage::helper('worldnet')->__('Customer was returned from WorldnetTPS.') . ' ' . $history;
231
+ $order->addStatusToHistory($order->getStatus(), $history);
232
+ $order->save();
233
+
234
+ $this->_redirect($redirectTo);
235
+ }
236
+
237
+ /**
238
+ * Expected GET HTTP Method
239
+ *
240
+ * @return void
241
+ */
242
+ protected function preResponse ()
243
+ {
244
+ $responseCryptString = $this->getRequest()->crypt;
245
+
246
+ if ($responseCryptString != '') {
247
+ $rArr = $this->getStandard()->cryptToArray($responseCryptString);
248
+ $ok = is_array($rArr)
249
+ && isset($rArr['Status']) && $rArr['Status'] != ''
250
+ && isset($rArr['VendorTxCode']) && $rArr['VendorTxCode'] != ''
251
+ && isset($rArr['Amount']) && $rArr['Amount'] != '';
252
+
253
+ if ($ok) {
254
+ $this->responseArr = $rArr;
255
+ $this->isValidResponse = true;
256
+ }
257
+ }
258
+ }
259
+
260
+ /**
261
+ * Failure Action
262
+ *
263
+ * @return void
264
+ */
265
+ public function failureAction ()
266
+ {
267
+ $session = Mage::getSingleton('checkout/session');
268
+
269
+ if (!$session->getErrorMessage()) {
270
+ $this->_redirect('checkout/cart');
271
+ return;
272
+ }
273
+ $this->_redirect('checkout/onepage/failure');
274
+ }
275
+ }
app/code/core/Mage/Worldnet/etc/config.xml ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_Worldnet
24
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_Worldnet>
31
+ <version>0.1.0</version>
32
+ </Mage_Worldnet>
33
+ </modules>
34
+ <global>
35
+ <models>
36
+ <worldnet>
37
+ <class>Mage_Worldnet_Model</class>
38
+ <resourceModel>worldnet_mysql4</resourceModel>
39
+ </worldnet>
40
+ <worldnet_mysql4>
41
+ <class>Mage_Worldnet_Model_Mysql4</class>
42
+ <entities>
43
+ <api_debug><table>worldnet_api_debug</table></api_debug>
44
+ </entities>
45
+ </worldnet_mysql4>
46
+ </models>
47
+ <resources>
48
+ <worldnet_setup>
49
+ <setup>
50
+ <module>Mage_Worldnet</module>
51
+ </setup>
52
+ <connection>
53
+ <use>core_setup</use>
54
+ </connection>
55
+ </worldnet_setup>
56
+ <worldnet_write>
57
+ <connection>
58
+ <use>core_write</use>
59
+ </connection>
60
+ </worldnet_write>
61
+ <worldnet_read>
62
+ <connection>
63
+ <use>core_read</use>
64
+ </connection>
65
+ </worldnet_read>
66
+ </resources>
67
+ <blocks>
68
+ <worldnet><class>Mage_Worldnet_Block</class></worldnet>
69
+ </blocks>
70
+ </global>
71
+ <frontend>
72
+ <secure_url>
73
+ <worldnet_standard>/worldnet/standard</worldnet_standard>
74
+ </secure_url>
75
+ <routers>
76
+ <worldnet>
77
+ <use>standard</use>
78
+ <args>
79
+ <module>Mage_Worldnet</module>
80
+ <frontName>worldnet</frontName>
81
+ </args>
82
+ </worldnet>
83
+ </routers>
84
+ <translate>
85
+ <modules>
86
+ <Mage_Worldnet>
87
+ <files>
88
+ <default>Mage_Worldnet.csv</default>
89
+ </files>
90
+ </Mage_Worldnet>
91
+ </modules>
92
+ </translate>
93
+ <layout>
94
+ <updates>
95
+ <worldnet>
96
+ <file>worldnet.xml</file>
97
+ </worldnet>
98
+ </updates>
99
+ </layout>
100
+ </frontend>
101
+ <adminhtml>
102
+ <translate>
103
+ <modules>
104
+ <Mage_Worldnet>
105
+ <files>
106
+ <default>Mage_Worldnet.csv</default>
107
+ </files>
108
+ </Mage_Worldnet>
109
+ </modules>
110
+ </translate>
111
+ </adminhtml>
112
+ <default>
113
+ <payment>
114
+ <worldnet_standard>
115
+ <worldnet_action>Payment</worldnet_action>
116
+ <model>worldnet/standard</model>
117
+ <title>WorldNet TPS secure payment page</title>
118
+ <allowspecific>0</allowspecific>
119
+ </worldnet_standard>
120
+ </payment>
121
+ </default>
122
+ </config>
app/code/core/Mage/Worldnet/etc/system.xml ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_Worldnet
24
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <sections>
30
+ <payment>
31
+ <groups>
32
+ <worldnet_standard translate="label" module="worldnet">
33
+ <label>WorldNet TPS (via Payment Page)</label>
34
+ <frontend_type>text</frontend_type>
35
+ <sort_order>101</sort_order>
36
+ <show_in_default>1</show_in_default>
37
+ <show_in_website>1</show_in_website>
38
+ <show_in_store>0</show_in_store>
39
+ <fields>
40
+ <active translate="label">
41
+ <label>Enabled</label>
42
+ <frontend_type>select</frontend_type>
43
+ <source_model>adminhtml/system_config_source_yesno</source_model>
44
+ <sort_order>1</sort_order>
45
+ <show_in_default>1</show_in_default>
46
+ <show_in_website>1</show_in_website>
47
+ <show_in_store>0</show_in_store>
48
+ </active>
49
+ <!-- <payment_action translate="label">
50
+ <label>Payment Action</label>
51
+ <frontend_type>select</frontend_type>
52
+ <source_model>worldnet/source_paymentAction</source_model>
53
+ <sort_order>2</sort_order>
54
+ <show_in_default>1</show_in_default>
55
+ <show_in_website>1</show_in_website>
56
+ <show_in_store>0</show_in_store>
57
+ </payment_action>
58
+ <title translate="label">
59
+ <label>Title</label>
60
+ <frontend_type>text</frontend_type>
61
+ <sort_order>3</sort_order>
62
+ <show_in_default>1</show_in_default>
63
+ <show_in_website>1</show_in_website>
64
+ <show_in_store>0</show_in_store>
65
+ </title>
66
+ <description translate="label">
67
+ <label>Transaction Description</label>
68
+ <comment>Store name will be used if left empty</comment>
69
+ <frontend_type>text</frontend_type>
70
+ <sort_order>3</sort_order>
71
+ <show_in_default>1</show_in_default>
72
+ <show_in_website>1</show_in_website>
73
+ <show_in_store>0</show_in_store>
74
+ </description>
75
+ --> <order_status translate="label">
76
+ <label>New order status</label>
77
+ <frontend_type>select</frontend_type>
78
+ <source_model>adminhtml/system_config_source_order_status</source_model>
79
+ <sort_order>4</sort_order>
80
+ <show_in_default>1</show_in_default>
81
+ <show_in_website>1</show_in_website>
82
+ <show_in_store>0</show_in_store>
83
+ </order_status>
84
+ <!-- <vendor_name translate="label">
85
+ <label>Vendor name</label>
86
+ <frontend_type>text</frontend_type>
87
+ <sort_order>5</sort_order>
88
+ <show_in_default>1</show_in_default>
89
+ <show_in_website>1</show_in_website>
90
+ <show_in_store>0</show_in_store>
91
+ </vendor_name>
92
+ <vendor_password translate="label">
93
+ <label>Vendor encrypted password</label>
94
+ <frontend_type>text</frontend_type>
95
+ <sort_order>6</sort_order>
96
+ <show_in_default>1</show_in_default>
97
+ <show_in_website>1</show_in_website>
98
+ <show_in_store>0</show_in_store>
99
+ </vendor_password>
100
+ --> <mode translate="label">
101
+ <label>Mode</label>
102
+ <frontend_type>select</frontend_type>
103
+ <source_model>worldnet/source_modeAction</source_model>
104
+ <sort_order>2</sort_order>
105
+ <show_in_default>1</show_in_default>
106
+ <show_in_website>1</show_in_website>
107
+ <show_in_store>0</show_in_store>
108
+ </mode>
109
+ <debug_flag translate="label">
110
+ <label>Debug</label>
111
+ <frontend_type>select</frontend_type>
112
+ <source_model>adminhtml/system_config_source_yesno</source_model>
113
+ <sort_order>3</sort_order>
114
+ <show_in_default>1</show_in_default>
115
+ <show_in_website>1</show_in_website>
116
+ <show_in_store>0</show_in_store>
117
+ </debug_flag>
118
+ <currency translate="label">
119
+ <label>Currency</label>
120
+ <frontend_type>select</frontend_type>
121
+ <source_model>worldnet/source_currencyAction</source_model>
122
+ <sort_order>4</sort_order>
123
+ <show_in_default>1</show_in_default>
124
+ <show_in_website>1</show_in_website>
125
+ <show_in_store>0</show_in_store>
126
+ </currency>
127
+ <terminalid translate="label">
128
+ <label>WorldNet TPS Terminal ID</label>
129
+ <frontend_type>text</frontend_type>
130
+ <sort_order>5</sort_order>
131
+ <show_in_default>1</show_in_default>
132
+ <show_in_website>1</show_in_website>
133
+ <show_in_store>0</show_in_store>
134
+ </terminalid>
135
+ <sharedsecret translate="label">
136
+ <label>Shared Secret</label>
137
+ <frontend_type>obscure</frontend_type>
138
+ <sort_order>6</sort_order>
139
+ <show_in_default>1</show_in_default>
140
+ <show_in_website>1</show_in_website>
141
+ <show_in_store>0</show_in_store>
142
+ </sharedsecret>
143
+ <!-- <allowspecific translate="label">
144
+ <label>Payment from applicable countries</label>
145
+ <frontend_type>allowspecific</frontend_type>
146
+ <sort_order>50</sort_order>
147
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
148
+ <show_in_default>1</show_in_default>
149
+ <show_in_website>1</show_in_website>
150
+ <show_in_store>1</show_in_store>
151
+ </allowspecific>
152
+ <specificcountry translate="label">
153
+ <label>Payment from Specific countries</label>
154
+ <frontend_type>multiselect</frontend_type>
155
+ <sort_order>51</sort_order>
156
+ <source_model>adminhtml/system_config_source_country</source_model>
157
+ <show_in_default>1</show_in_default>
158
+ <show_in_website>1</show_in_website>
159
+ <show_in_store>1</show_in_store>
160
+ </specificcountry>
161
+ --> <sort_order translate="label">
162
+ <label>Sort order</label>
163
+ <frontend_type>text</frontend_type>
164
+ <sort_order>100</sort_order>
165
+ <show_in_default>1</show_in_default>
166
+ <show_in_website>1</show_in_website>
167
+ <show_in_store>0</show_in_store>
168
+ </sort_order>
169
+ </fields>
170
+ </worldnet_standard>
171
+ </groups>
172
+ </payment>
173
+ </sections>
174
+ </config>
app/code/core/Mage/Worldnet/nbproject/private/private.properties ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ copy.src.files=false
2
+ copy.src.target=
3
+ index.file=
4
+ run.as=LOCAL
5
+ url=http://localhost/magento/
app/code/core/Mage/Worldnet/nbproject/private/private.xml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project-private xmlns="http://www.netbeans.org/ns/project-private/1">
3
+ <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
4
+ </project-private>
app/code/core/Mage/Worldnet/nbproject/project.properties ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ include.path=${php.global.include.path}
2
+ source.encoding=UTF-8
3
+ src.dir=.
4
+ tags.asp=false
5
+ tags.short=true
6
+ web.root=.
app/code/core/Mage/Worldnet/nbproject/project.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project xmlns="http://www.netbeans.org/ns/project/1">
3
+ <type>org.netbeans.modules.php.project</type>
4
+ <configuration>
5
+ <data xmlns="http://www.netbeans.org/ns/php-project/1">
6
+ <name>Protx</name>
7
+ </data>
8
+ </configuration>
9
+ </project>
app/code/core/Mage/Worldnet/sql/worldnet_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Worldnet
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ $installer = $this;
29
+ /* @var $installer Mage_Worldnet_Model_Mysql4_Setup */
30
+
31
+ $installer->startSetup();
32
+
33
+ $installer->run("
34
+ CREATE TABLE `{$this->getTable('worldnet_api_debug')}` (
35
+ `debug_id` int(10) unsigned NOT NULL auto_increment,
36
+ `transaction_id` varchar(255) NOT NULL default '',
37
+ `debug_at` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
38
+ `request_body` text,
39
+ `response_body` text,
40
+ PRIMARY KEY (`debug_id`),
41
+ KEY `debug_at` (`debug_at`)
42
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
43
+
44
+ ");
45
+
46
+ $installer->endSetup();
app/design/default/default/layout/worldnet.xml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design_default
23
+ * @package Mage_Worldnet
24
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+ -->
29
+ <layout version="0.1.0">
30
+ <!--
31
+ Worldnet Failure Response Review
32
+ -->
33
+ <worldnet_standard_failure>
34
+ <reference name="root">
35
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
36
+ </reference>
37
+ <reference name="content">
38
+ <block type="worldnet/standard_failure" name="worldnet_standard_failure" template="worldnet/standard/failure.phtml">
39
+ </block>
40
+ </reference>
41
+ </worldnet_standard_failure>
42
+
43
+ </layout>
app/design/default/default/template/worldnet/standard/failure.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Worldnet
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <div class="page-head">
28
+ <h3><?php echo $this->__('Error occured') ?></h3>
29
+ </div>
30
+ <p><?php echo $this->getErrorMessage() ?>.</p>
31
+ <p><?php echo $this->__('Please <a href="%s">continue shopping</a>.', $this->getContinueShoppingUrl()) ?></p>
app/design/default/default/template/worldnet/standard/form.phtml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design_default
22
+ * @package Mage_Protx
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <fieldset class="form-list">
28
+ <?php $_code=$this->getMethodCode() ?>
29
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
30
+ <li>
31
+ <?php echo $this->__('You will be redirected to WorldnetTPS website when you place an order.') ?>
32
+ </li>
33
+ </ul>
34
+ </fieldset>
app/design/default/modern/layout/worldnet.xml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design_default
23
+ * @package Mage_Protx
24
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+ -->
29
+ <layout version="0.1.0">
30
+ <!--
31
+ Protx Failure Response Review
32
+ -->
33
+ <worldnet_standard_failure>
34
+ <reference name="root">
35
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
36
+ </reference>
37
+ <reference name="content">
38
+ <block type="worldnet/standard_failure" name="worldnet_standard_failure" template="worldnet/standard/failure.phtml">
39
+ </block>
40
+ </reference>
41
+ </worldnet_standard_failure>
42
+
43
+ </layout>
app/design/default/modern/template/worldnet/standard/failure.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Protx
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <div class="page-head">
28
+ <h3><?php echo $this->__('Error occured') ?></h3>
29
+ </div>
30
+ <p><?php echo $this->getErrorMessage() ?>.</p>
31
+ <p><?php echo $this->__('Please <a href="%s">continue shopping</a>.', $this->getContinueShoppingUrl()) ?></p>
app/design/default/modern/template/worldnet/standard/form.phtml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design_default
22
+ * @package Mage_Protx
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <fieldset class="form-list">
28
+ <?php $_code=$this->getMethodCode() ?>
29
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
30
+ <li>
31
+ <?php echo $this->__('You will be redirected to WorldnetTPS website when you place an order.') ?>
32
+ </li>
33
+ </ul>
34
+ </fieldset>
app/design/frontend/default/default/layout/worldnet.xml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design_default
23
+ * @package Mage_Protx
24
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+ -->
29
+ <layout version="0.1.0">
30
+ <!--
31
+ Protx Failure Response Review
32
+ -->
33
+ <worldnet_standard_failure>
34
+ <reference name="root">
35
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
36
+ </reference>
37
+ <reference name="content">
38
+ <block type="worldnet/standard_failure" name="worldnet_standard_failure" template="worldnet/standard/failure.phtml">
39
+ </block>
40
+ </reference>
41
+ </worldnet_standard_failure>
42
+
43
+ </layout>
app/design/frontend/default/default/template/worldnet/standard/failure.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Protx
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <div class="page-head">
28
+ <h3><?php echo $this->__('Error occured') ?></h3>
29
+ </div>
30
+ <p><?php echo $this->getErrorMessage() ?>.</p>
31
+ <p><?php echo $this->__('Please <a href="%s">continue shopping</a>.', $this->getContinueShoppingUrl()) ?></p>
app/design/frontend/default/default/template/worldnet/standard/form.phtml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design_default
22
+ * @package Mage_Protx
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <fieldset class="form-list">
28
+ <?php $_code=$this->getMethodCode() ?>
29
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
30
+ <li>
31
+ <?php echo $this->__('You will be redirected to WorldnetTPS website when you place an order.') ?>
32
+ </li>
33
+ </ul>
34
+ </fieldset>
app/design/frontend/default/modern/layout/worldnet.xml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design_default
23
+ * @package Mage_Protx
24
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+ -->
29
+ <layout version="0.1.0">
30
+ <!--
31
+ Protx Failure Response Review
32
+ -->
33
+ <worldnet_standard_failure>
34
+ <reference name="root">
35
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
36
+ </reference>
37
+ <reference name="content">
38
+ <block type="worldnet/standard_failure" name="worldnet_standard_failure" template="worldnet/standard/failure.phtml">
39
+ </block>
40
+ </reference>
41
+ </worldnet_standard_failure>
42
+
43
+ </layout>
app/design/frontend/default/modern/template/worldnet/standard/failure.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Protx
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <div class="page-head">
28
+ <h3><?php echo $this->__('Error occured') ?></h3>
29
+ </div>
30
+ <p><?php echo $this->getErrorMessage() ?>.</p>
31
+ <p><?php echo $this->__('Please <a href="%s">continue shopping</a>.', $this->getContinueShoppingUrl()) ?></p>
app/design/frontend/default/modern/template/worldnet/standard/form.phtml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design_default
22
+ * @package Mage_Protx
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <fieldset class="form-list">
28
+ <?php $_code=$this->getMethodCode() ?>
29
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
30
+ <li>
31
+ <?php echo $this->__('You will be redirected to WorldnetTPS website when you place an order.') ?>
32
+ </li>
33
+ </ul>
34
+ </fieldset>
app/etc/modules/Mage_Worldnet.xml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_Protx
24
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_Worldnet>
31
+ <active>true</active>
32
+ <codePool>core</codePool>
33
+ <depends>
34
+ <Mage_Paygate />
35
+ </depends>
36
+ </Mage_Worldnet>
37
+ </modules>
38
+ </config>
app/locale/en_US/Mage_Worldnet.csv ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "AUTHENTICATE","AUTHENTICATE"
2
+ "Customer successfully returned from WorldnetTPS","Customer successfully returned from WorldnetTPS"
3
+ "Customer was redirected to WorldnetTPS","Customer was redirected to WorldnetTPS"
4
+ "Customer was returned from WorldnetTPS.","Customer was returned from WorldnetTPS."
5
+ "DEFERRED","DEFERRED"
6
+ "Debug","Debug"
7
+ "Enabled","Enabled"
8
+ "Error occured","Error occured"
9
+ "Live","Live"
10
+ "Mode","Mode"
11
+ "New order status","New order status"
12
+ "Order ","Order "
13
+ "Order total amount does not match WorldnetTPS gross total amount","Order total amount does not match WorldnetTPS gross total amount"
14
+ "PAYMENT","PAYMENT"
15
+ "Payment Action","Payment Action"
16
+ "Payment from Specific countries","Payment from Specific countries"
17
+ "Payment from applicable countries","Payment from applicable countries"
18
+ "Please <a href=""%s"">continue shopping</a>.","Please <a href=""%s"">continue shopping</a>."
19
+ "WorldnetTPS Standard","WorldnetTPS Standard"
20
+ "Simulator","Simulator"
21
+ "Sort order","Sort order"
22
+ "Test","Test"
23
+ "Title","Title"
24
+ "Transaction Description","Transaction Description"
25
+ "Vendor encrypted password","Vendor encrypted password"
26
+ "Vendor name","Vendor name"
27
+ "You will be redirected to WorldnetTPS website when you place an order.","You will be redirected to WorldnetTPS website when you place an order."
28
+ "You will be redirected to WorldnetTPS in a few seconds.","You will be redirected to WorldnetTPS in a few seconds."
package.xml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>WorldNet_HPP</name>
4
+ <version>1.2.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>This module provides a Magento payment method for the WorldNet TPS payment system. It implements payments through the WorldNet TPS Hosted Payment Page (HPP).</summary>
10
+ <description>This module provides a Magento payment method for the WorldNet TPS payment system. It implements payments through the WorldNet TPS Hosted Payment Page (HPP).
11
+
12
+ To learn more about the WorldNet TPS Hosted Payment Page, please visit www.WorldNetTPS.com</description>
13
+ <notes>This module will overwrite your system.xml file.
14
+
15
+ Once you have added this you will need to go to the admin section of your Magento installation:
16
+
17
+ Magento Admin -&gt; System -&gt; Configuration
18
+ Click on "Payment Methods" (on the left)
19
+ You should then see "WorldNet TPS (via Payment Page)" appear as a payment method (if not see below). Click on this and select Enabled = "Yes".
20
+ Enter the test Currency, Terminal ID and your "Shared Secret". (These details were supplied by WorldNet TPS.)
21
+ Change the "New order status" to "Awaiting payment via WorldNet TPS".
22
+ Click "Apply" in the top right corner.
23
+
24
+ N.B. If the module does not appear on the "Payment Methods" page you may have to clear Magento's cache.
25
+ To do this go to System -&gt; Cache Management, Change "No Change" to "Refresh" and then save the cache settings.
26
+
27
+ You must then setup the Receipt page URL in the WorldNet TPS Selfcare system. This should be set to:
28
+ "http://www.yoursite.com/index.php/worldnet/standard/successResponse"</notes>
29
+ <authors><author><name>Kevin Pattison</name><user>auto-converted</user><email>kevin.pattison@worldnettps.com</email></author></authors>
30
+ <date>2009-08-05</date>
31
+ <time>14:29:08</time>
32
+ <contents><target name="mage"><dir name="app"><dir name="code"><dir name="core"><dir name="Mage"><dir name="Sales"><dir name="etc"><file name="config.xml" hash="c21c04d6691e79a0f322d76c135866df"/></dir></dir><dir name="Worldnet"><dir name="Block"><dir name="Standard"><file name="Failure.php" hash="f3e705cf711932100589d3b4c8106c08"/><file name="Form.php" hash="56b33428fc43ae46322dda8e62a3ac76"/><file name="Redirect.php" hash="8b389476af008fc61f9412d4313d41a6"/></dir></dir><dir name="controllers"><file name="StandardController.php" hash="f6fb7c3f70dad5c8686e112348439533"/></dir><dir name="etc"><file name="config.xml" hash="5ad1213b679e6154feaa0901546ce14b"/><file name="system.xml" hash="1bf0cedebed0c2627ce25faa8b53da5a"/></dir><dir name="Helper"><file name="Data.php" hash="b28afe532c421add22571db28ed4bd43"/></dir><dir name="Model"><file name="Config.php" hash="506d6bad68d0d61dabadf98e68443d07"/><file name="Session.php" hash="5ae214b0aad30f6ca5062d958654e99a"/><file name="Standard.php" hash="45a90de2b2cb708264dd3eaee03abbe5"/><dir name="Api"><file name="Debug.php" hash="560d9c6823b9a3f9421dd1db88f6e547"/></dir><dir name="Mysql4"><file name="Setup.php" hash="621ba5546a08ef619bc2c6f7c84b9beb"/><dir name="Api"><file name="Debug.php" hash="96e22a9c503931d85c1e64a360712c3c"/><dir name="Debug"><file name="Collection.php" hash="fba9218bab730ea4e9f161de17c45c1c"/></dir></dir></dir><dir name="Source"><file name="CurrencyAction.php" hash="f5ab5219ea0cfcfbfe8c8b06388d3d75"/><file name="ModeAction.php" hash="898d443ba60d7b19311f51fd23632923"/><file name="PaymentAction.php" hash="8862c80076b4d59c0972da24a95a4c35"/></dir></dir><dir name="nbproject"><file name="project.properties" hash="4aad25e24c83519ab6ea9012d5995504"/><file name="project.xml" hash="78cdc8723b5bff4bf29711d0b7d8e626"/><dir name="private"><file name="private.properties" hash="c425fb8252951c8e34648ed14e4a1b4b"/><file name="private.xml" hash="8db5aa1af9a60c837ae0c674b2111063"/></dir></dir><dir name="sql"><dir name="worldnet_setup"><file name="mysql4-install-0.1.0.php" hash="5715d336662b1012de6c72399ebecea8"/></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="default"><dir name="default"><dir name="layout"><file name="worldnet.xml" hash="6522a5169fee4cf1b44f5f455aff070a"/></dir><dir name="template"><dir name="worldnet"><dir name="standard"><file name="failure.phtml" hash="63ab5c097322c4be7c950ce123f23445"/><file name="form.phtml" hash="710d1167d804c9699166d0c6f4e8deec"/></dir></dir></dir></dir><dir name="modern"><dir name="layout"><file name="worldnet.xml" hash="594665b45f2a42b0fe0900e4b9ede239"/></dir><dir name="template"><dir name="worldnet"><dir name="standard"><file name="failure.phtml" hash="4b83f4b99d5bda8fcc77c00b9b8c5b3a"/><file name="form.phtml" hash="710d1167d804c9699166d0c6f4e8deec"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="worldnet.xml" hash="594665b45f2a42b0fe0900e4b9ede239"/></dir><dir name="template"><dir name="worldnet"><dir name="standard"><file name="failure.phtml" hash="4b83f4b99d5bda8fcc77c00b9b8c5b3a"/><file name="form.phtml" hash="710d1167d804c9699166d0c6f4e8deec"/></dir></dir></dir></dir><dir name="modern"><dir name="layout"><file name="worldnet.xml" hash="594665b45f2a42b0fe0900e4b9ede239"/></dir><dir name="template"><dir name="worldnet"><dir name="standard"><file name="failure.phtml" hash="4b83f4b99d5bda8fcc77c00b9b8c5b3a"/><file name="form.phtml" hash="710d1167d804c9699166d0c6f4e8deec"/></dir></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Mage_Worldnet.xml" hash="b27d988cee0846692ec95dc5c6d92e97"/></dir></dir><dir name="locale"><dir name="en_US"><file name="Mage_Worldnet.csv" hash="7de04703ae15e7bb9bd02c511590e767"/></dir></dir></dir></target></contents>
33
+ <compatible/>
34
+ <dependencies/>
35
+ </package>