Plugin Directory

Changeset 2035173


Ignore:
Timestamp:
02/20/2019 02:56:01 PM (7 years ago)
Author:
litego
Message:

Verify payment by status and paid amount

Location:
woo-litego/trunk/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • woo-litego/trunk/includes/class-wc-gateway-litego.php

    r2014867 r2035173  
    321321                    if ($order->has_status('pending')) {
    322322                        $verification = $this->get_charge($charge_id);
    323                         if ($verification['paid']) {
     323                        //check status and amount which was paid
     324                        if ($verification['paid'] && intval($verification['amount_paid_satoshi']) >= $this->get_amount_satoshi($order->get_total())) {
    324325                            $order->payment_complete();
    325326                            $this->log(sprintf(__('order has been completed, paid by charge %s.', 'woo-litego'), $charge_id));
  • woo-litego/trunk/includes/class-wc-litego-api.php

    r2014867 r2035173  
    240240                'amount' => $result['response_result']['amount'],
    241241                'amount_satoshi' => $result['response_result']['amount_satoshi'],
     242                'amount_paid_satoshi' => $result['response_result']['amount_paid_satoshi'],
    242243                'payment_request' => $result['response_result']['payment_request'],
    243244                'paid' => $result['response_result']['paid'],
Note: See TracChangeset for help on using the changeset viewer.