Skip to content

Commit 34fb846

Browse files
committed
"Hypercharge Payment Plugin" "2.2.7" : "add the option Abgelehnte Bestellungen wiederherstellen // 2016-02-18"
1 parent f8b5fa4 commit 34fb846

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

Frontend/HyperchargePaymentWpf/Bootstrap.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,11 @@ public function createForm() {
252252
'store' => array(array('transactionId', 'TransactionID'), array('uniqueId', 'UniqueID'))
253253
));
254254
$positions['transactionId'] = $index++;
255+
$form->setElement('checkbox', 'recover_rejected_orders', array(
256+
'label' => 'Abgelehnte Bestellungen wiederherstellen',
257+
'value' => false
258+
));
259+
$positions['recover_rejected_orders'] = $index++;
255260
$form->setElement('text', 'cancelled_orders_emails', array(
256261
'label' => 'E-Mail Adresse - abgebrochene Bestellungen',
257262
'value' => ''
@@ -299,7 +304,8 @@ public function createTranslations() {
299304
'agree_link' => 'My consent link',
300305
'birthday_validation' => 'Purchase on Account Birthday Validation',
301306
'transactionId' => 'TransactionID field',
302-
'cancelled_orders_emails' => 'Email address - cancelled orders'
307+
'cancelled_orders_emails' => 'Email address - cancelled orders',
308+
'recover_rejected_orders' => 'Recover rejected orders'
303309
)
304310
);
305311
$shopRepository = Shopware()->Models()->getRepository('\Shopware\Models\Shop\Locale');

Frontend/HyperchargePaymentWpf/Controllers/frontend/Hyperchargewpf.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,11 @@ public function notifyAction() {
494494
}
495495

496496
if (!$orderId) {
497-
if(in_array($newStatus, array(12,18,17))){
497+
$recoverOrder = in_array($newStatus, array(12,18,17));
498+
if(!$recoverOrder){
499+
$recoverOrder = $config->recover_rejected_orders;
500+
}
501+
if($recoverOrder){
498502
//check if it is a cancelled order
499503
//but only for approved or pending
500504
$sql = "SELECT o.id AS orderId

Frontend/HyperchargePaymentWpf/plugin.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010
"support": "[email protected]",
1111
"description": "<p><img src='data:image/png;base64,<%IMG%>' /></p><p style='font-size:12px; font-weight: bold;'>Hypercharge WebPaymentForm allows you to use a variety of payment methods, both online and off-line. Any sensitive information is safely aquired an processed on out platform</p>",
1212

13-
"currentVersion": "2.2.6",
13+
"currentVersion": "2.2.7",
1414

1515
"changelog": {
1616
"de": {
1717
},
1818
"en": {
19+
"2.2.7" : "add the option Abgelehnte Bestellungen wiederherstellen // 2016-02-18",
1920
"2.2.6" : "log hypercharge orders and recover the canceled orders if they were created ok on Hypercharge // 2016-02-08",
2021
"2.2.5" : "imporve the logging // 2016-02-01",
2122
"2.2.4" : "create weekly emails about the cancelled orders // 2016-01-29",

0 commit comments

Comments
 (0)