Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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’.

    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?

Viewing 2 replies - 1 through 2 (of 2 total)