dvdl16 / woocommerce_fusion

WooCommerce connector for ERPNext v15
https://finfoot.tech
Other
27 stars 24 forks source link

Failed payments on WooCommerce shouldn't create Payment Entries #59

Open dvdl16 opened 6 months ago

dvdl16 commented 6 months ago

Ref 215

dvdl16 commented 6 months ago
{
    "_links": {
        "collection": [
            {
                "href": "https://wwww.mysite.com/wp-json/wc/v3/orders"
            }
        ],
        "self": [
            {
                "href": "https://wwww.mysite.com/wp-json/wc/v3/orders/15674"
            }
        ]
    },
    "billing": {
    },
    "cart_hash": "12345",
    "cart_tax": "120.13",
    "coupon_lines": [
    ],
    "created_via": "checkout",
    "currency": "ZAR",
    "currency_symbol": "R",
    "customer_id": 0,
    "customer_ip_address": "x.x.x.x",
    "customer_note": "",
    "customer_user_agent": "redacted",
    "date_completed": null,
    "date_completed_gmt": null,
    "date_created": "2024-04-29T14:23:27",
    "date_created_gmt": "2024-04-29T12:23:27",
    "date_modified": "2024-04-29T14:23:27",
    "date_modified_gmt": "2024-04-29T12:23:27",
    "date_paid": null,
    "date_paid_gmt": null,
    "discount_tax": "0.00",
    "discount_total": "0.00",
    "fee_lines": [
    ],
    "id": 15674,
    "is_editable": true,
    "line_items": [
    ],
    "meta_data": [
        {
            "id": 5168043,
            "key": "is_vat_exempt",
            "value": "no"
        },
        {
            "id": 5168044,
            "key": "wt_pklist_order_language",
            "value": "en_GB"
        },
        {
            "id": 5168045,
            "key": "_wc_order_attribution_source_type",
            "value": "typein"
        },
        {
            "id": 5168046,
            "key": "_wc_order_attribution_utm_source",
            "value": "(direct)"
        },
        {
            "id": 5168047,
            "key": "_wc_order_attribution_session_entry",
            "value": "https://wwww.mysite.com/"
        },
        {
            "id": 5168048,
            "key": "_wc_order_attribution_session_start_time",
            "value": "2024-04-29 11:26:51"
        },
        {
            "id": 5168049,
            "key": "_wc_order_attribution_session_pages",
            "value": "32"
        },
        {
            "id": 5168050,
            "key": "_wc_order_attribution_session_count",
            "value": "1"
        },
        {
            "id": 5168052,
            "key": "_wc_order_attribution_device_type",
            "value": "Mobile"
        },
        {
            "id": 5168053,
            "key": "yoco_order_checkout_id",
            "value": "ch_redacted"
        },
        {
            "id": 5168054,
            "key": "yoco_order_checkout_mode",
            "value": "live"
        },
        {
            "id": 5168055,
            "key": "yoco_order_checkout_url",
            "value": "https://c.yoco.com/checkout/ch_XXXXXXXXXXXXXX"
        }
    ],
    "needs_payment": true,
    "needs_processing": true,
    "number": "15674",
    "order_key": "wc_order_redacted",
    "parent_id": 0,
    "payment_method": "class_yoco_wc_payment_gateway",
    "payment_method_title": "Yoco",
    "payment_url": "https://wwww.mysite.com/checkout/order-pay/15674/?pay_for_order=true&key=wc_order_XXXXXXXXXXXXXXX",
    "prices_include_tax": true,
    "pw_gift_cards_redeemed": [
    ],
    "refunds": [
    ],
    "shipping": {
    },
    "shipping_lines": [
        {
            "id": 29372,
            "instance_id": "23",
            "meta_data": [
            ],
            "method_id": "wbs",
            "method_title": "Weight Based Shipping",
            "taxes": [
            ],
            "total": "159.20",
            "total_tax": "0.00"
        }
    ],
    "shipping_tax": "0.00",
    "shipping_total": "159.20",
    "status": "pending",
    "tax_lines": [
        {
            "compound": false,
            "id": 29373,
            "label": "VAT",
            "meta_data": [
            ],
            "rate_code": "VAT-1",
            "rate_id": 1,
            "rate_percent": 15,
            "shipping_tax_total": "0.00",
            "tax_total": "120.13"
        }
    ],
    "total": "1080.19",
    "total_tax": "120.13",
    "transaction_id": "",
    "version": "8.8.2"
}