I have the same problem on WordPress 5.2.2 (latest) and woocommerce 3.7.1 (latest). And for about a year, it’s still the same problem with all releases! I also wrote to satispay but they didn’t even answer me. Do you have news?
————-
Io ho lo stesso problema su WordPress 5.2.2 (latest) e woocommerce 3.7.1 (latest). E da circa un anno è sempre lo stesso problema con tutte le versioni! Ho scritto anche a satispay ma non mi hanno nemmeno risposto. Hai novità sulla soluzione al problema?
No, unfortunately, then from what you say does not depend on the fact of having a version not updated. I hope they will get a move on fixing the plugin. I can’t find another way to contact them.
————-
No purtroppo, allora da quel che dici non dipende dal fatto di avere una versione non aggiornata. Spero che si diano una mossa a sistemare il plugin. Non trovo altro modo per contattarli.
After an inspection of the plugin code i probably found what can cause the problem of the order status pending.
SOLUTION:
In the file “wc-satispay.php” in “function gateway_api()” the line below marked up in bold is missing and it is required.
______________________________________________________________________________________
Dopo un’ispezione al codice del plugin probabilmente ho trovato cosa causa il problema dell’ordine che rimane nello stato PENDING.
SOLUZIONE:
Nel file “wc-satispay.php” la funzione “function gateway_api()” la linea qui giù in grassetto manca ed è necessaria
public function gateway_api() {
switch($_GET[‘action’]) {
case ‘redirect’:
$payment = \SatispayGBusiness\Payment::get($_GET[‘payment_id’]);
$order = new WC_Order($payment->metadata->order_id);
if ($payment->status === ‘ACCEPTED’) {
$order->payment_complete($payment->id);
header(‘Location: ‘.$this->get_return_url($order));
} else {
\SatispayGBusiness\Payment::update($payment->id, array( ‘action’ => ‘CANCEL’ ));
header(‘Location: ‘.$order->get_cancel_order_url_raw()); }
break;
case ‘callback’:
$payment = \SatispayGBusiness\Payment::get($_GET[‘payment_id’]);
$order = new WC_Order($payment->metadata->order_id);
if ($order->has_status(wc_get_is_paid_statuses())) {
exit;
}
if ($payment->status === ‘ACCEPTED’) {
$order->payment_complete($payment->id);
}
break;
}
}
I tried to pay an order and it works! The order status changed from ‘Pending Payment’ to ‘Processing’.
______
Ho provato a pagare un ordine e funziona correttamente! Lo stato dell’ordine è passato da ‘In attesa di pagamento’ a ‘In lavorazione’.
I tried to pay an order with a Satispay account with zero credit, satispay refused the transaction and the order changed from ‘Pending Payment’ to ‘Cancelled’
______
Ho provato a pagare un ordine con un account Satispay senza credito, Satispay ha rifiutato la transazione e lo stato dell’ordine è passato da ‘in attesa di pagamento’ a ‘cancellato’.
Ciao,
se lo stato dell’ordine non cambia a seguito di un pagamento con Satispay significa che la callback fallisce o non la ricevete per le configurazioni del firewall.
Vi invitiamo a contattarci scrivendo una mail a [email protected]
Restiamo a disposizione,
Satispay Team