@@ -217,7 +217,7 @@ public function index()
217
217
$ data ['entry_verification_code ' ] = $ this ->language ->get ('entry_verification_code ' );
218
218
$ data ['text_card_details ' ] = $ this ->language ->get ('text_card_details ' );
219
219
$ data ['error_card ' ] = $ this ->language ->get ('error_card ' );
220
- $ data ['text_mollie_payments ' ] = sprintf ($ this ->language ->get ('text_mollie_payments ' ), '<a href="https://www.mollie.com/" target="_blank"><img src=" https://www.mollie.com/images/logo.png " alt="Mollie" border="0"></a> ' );
220
+ $ data ['text_mollie_payments ' ] = sprintf ($ this ->language ->get ('text_mollie_payments ' ), '<a href="https://www.mollie.com/" target="_blank"><img src="https://www.mollie.com/checkout/v3/ images/icons/ui/ logo.svg " alt="Mollie" border="0"></a> ' );
221
221
222
222
// Mollie components
223
223
$ data ['mollieComponents ' ] = false ;
@@ -1093,17 +1093,6 @@ public function createShipment(&$route, &$data, $orderID = "", $orderStatusID =
1093
1093
*/
1094
1094
public function callback ()
1095
1095
{
1096
- if (isset ($ _SERVER ['HTTP_REFERER ' ]) && !stristr ($ _SERVER ['HTTP_REFERER ' ], "www.mollie.com " )) {
1097
-
1098
- if (isset ($ this ->session ->data ['order_id ' ])) {
1099
- $ this ->cart ->clear ();
1100
- unset($ this ->session ->data ['order_id ' ]);
1101
- }
1102
-
1103
- $ this ->redirect ($ this ->url ->link ("common/home " , "" , "SSL " ));
1104
- return '' ;
1105
- }
1106
-
1107
1096
$ moduleCode = MollieHelper::getModuleCode ();
1108
1097
$ order_id = $ this ->getOrderID ();
1109
1098
@@ -1160,13 +1149,15 @@ public function callback()
1160
1149
1161
1150
}
1162
1151
1163
- if (($ orderDetails ->isPaid () || $ orderDetails ->isAuthorized ()) && $ order ['order_status_id ' ] != $ paid_status_id ) {
1152
+ $ orderStatuses = $ model ->getOrderStatuses ($ order ['order_id ' ]);
1153
+
1154
+ if (($ orderDetails ->isPaid () || $ orderDetails ->isAuthorized ()) && !in_array ($ paid_status_id , $ orderStatuses )) {
1164
1155
$ this ->addOrderHistory ($ order , $ paid_status_id , $ this ->language ->get ("response_success " ), true );
1165
1156
$ order ['order_status_id ' ] = $ paid_status_id ;
1166
1157
} else if (!empty ($ orderDetails ->_embedded ->payments )) {
1167
1158
1168
1159
$ payment = $ orderDetails ->_embedded ->payments [0 ];
1169
- if (($ payment ->status == 'paid ' ) && ( $ order [ ' order_status_id ' ] != $ paid_status_id )) {
1160
+ if (($ payment ->status == 'paid ' ) && ! in_array ( $ paid_status_id , $ orderStatuses )) {
1170
1161
$ this ->addOrderHistory ($ order , $ paid_status_id , $ this ->language ->get ("response_success " ), true );
1171
1162
$ order ['order_status_id ' ] = $ paid_status_id ;
1172
1163
}
0 commit comments