WP Manifestindependent plugin directory
manifest / ecommerce / woocommerce-amego

WooCommerce Amego WP Registry grade D+. High-severity findings · 2 findingsWP RegistryHigh-severity findings · 2 findingsOpen the reportD+

Woocommerce 串接 Amego 電子發票平台

★ 1stars
49release downloads
≈30active sites
v1.1.0latest · 3 years ago

Install

Download woocommerce-amego.zip From the v1.1.0 release on GitHub, Jun 26, 2023

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/foojiayin/woocommerce-amego/releases/download/v1.1.0/woocommerce-amego.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Amego Invoice Platform - WooCommerce Plugin

中文版 README.zh.md

Note: This is not an official plugin from Amego

Guide

Features

  • When payment is completed for a WooCommerce order, the order information will be sent to Amego to issue an invoice
  • Available options for invoice type on the checkout page
    • Paper Invoice (紙本發票)
    • Company (公司統一編號)
    • Mobile Carrier (手機載具)
    • Citizen Digital Certificate (自然人憑證條碼)
    • Invoice Donation (捐贈發票)
  • The following information will be sent:
    • Order ID
    • Invoice Date
    • Customer Name
    • Customer Email, Address and Phone Number (if provided)
    • Invoice Type
    • Carrier Number 載具條碼 / Company Tax ID 公司統一編號 / Donation Code 捐贈碼 (if provided)
    • Total Amount including tax
    • Taxable Sales Amount: Total Amount
    • Tax-Free Sales Amount: 0
    • Sales Tax Amount: If the invoice is for a company, it will be 5% of the total amount; otherwise will be 0
    • Tax Type: Taxable
    • Product Item Name, Quantity, Unit Price & Total Amount including tax

Limitations

  • Invoice information will NOT be updated automatically after the order is updated or is cancelled. The merchant must manually update the invoice information or cancel the invoice on Amego

Installation

  1. Download the woocommerce-amego.zip from the latest release
  2. Go to wordpress admin panel, click on Plugins -> Add New -> Upload Plugin
  3. Upload the zip file and activate the plugin
  4. Go to Settings -> Amego, enter invoice ID and App Key and save

    Note: If you don't have a App Key, please contact Amego support

Testing

Test the plugin with the following credentials:

  • Invoice ID: 12345678
  • App Key: sHeq7t8G1wiQvhAuIM27

After purchase in WooCommerce, go to Login Page > 測試帳號登入 to view the records of testing invoice

Test API without purchase:

curl -X POST -H "Content-Type: application/json" -d '' https://your-domain.com/wp-json/amego/v1/test

This will send a synthetic order to Amego

Reference

Releases

2 releases. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
v1.1.0 latest
Jun 26, 2023 3 years ago
woocommerce-amego.zip
16
Jun 25, 2023 3 years ago
woocommerce-amego.zip
33

Active-site estimate ≈30 comes from the median of recent superseded releases. Method.

D+ grade

Security

WooCommerce Amego 1.1.0 · audited by WP Registry

High-severity findings.

2 high
Audited release
1.1.0
Findings
2
Worst severity
high
Content hash
f334164a25da40854051734e…

Findings

  • high Unauthenticated REST /amego/v1/test issues e-invoices with stored Amego credentials

    missing_permission_callback

    src/test.php is required from the main plugin file in production. amego_test_endpoint() registers POST /wp-json/amego/v1/test with permission_callback __return_true and no nonce. amego_test_handler() ignores the request body and always calls test_send_invoice(), which reads options amego_invoice and amego_app_key, builds a hardcoded C0401 payload (OrderId=unix time, BuyerName 'Amego woocommerce', three 'Product' lines, SalesAmount/TotalAmount 180), signs with md5(json + time + app_key), and curl-POSTs to https://invoice-api.amego.tw/json/c0401. The README documents this as an unauthenticated curl with no token. Anyone on the internet can therefore mint Taiwan e-invoices against the merchant's 統編 and App Key, exhaust the government-allocated invoice range, and create tax records that do not match WooCommerce orders. The REST response is only {success:true}; the Amego body is written to the public plugin log (see sibling finding). This is a leftover test/dev tool, not a webhook that validates an Amego signature.

    src/test.php:7-29

    Recommendation

    Remove src/test.php from the production plugin (do not require it from woocommerce-amego.php). If a health-check must remain, gate it with permission_callback current_user_can('manage_options') plus a REST nonce, and never call the live C0401 issue API from an unauthenticated route.

  • high Invoice PII and PHP errors written to web-accessible plugin logs/

    information_disclosure

    src/log.php sets $log_path to plugin_dir_path(__FILE__).'../logs' (wp-content/plugins/woocommerce-amego/logs) and print_log() file_put_contents appends to amego.log with no flock/htaccess/capability check. The shipped zip already contains empty logs/amego.log and logs/error.log and no .htaccess or index.php, so the path is predictable and typically served as a static file. send_invoice() (woocommerce_payment_complete) logs the full C0401 JSON — BuyerName, BuyerAddress, BuyerPhoneNumber, BuyerEmailAddress, CarrierId1/2, NPOBAN, BuyerIdentifier (company tax ID), product names/amounts — then logs the Amego API response (invoice numbers / errors). test_send_invoice() logs the same for the unauth REST probe. The same file also ini_set('log_errors',1), ini_set('error_log', "$log_path/error.log"), and set_error_handler('error_handler') on every WordPress request, so PHP errors from this plugin and the rest of the site are redirected into the same public directory. After any completed payment (or a single POST to /wp-json/amego/v1/test), an unauthenticated GET of /wp-content/plugins/woocommerce-amego/logs/amego.log discloses other customers' invoice PII.

    src/log.php:3-22

    Recommendation

    Stop logging PII. If logging is required, write under wp-content/uploads with a random unguessable name, deny HTTP access (.htaccess + web-server rule), and never ship world-readable log files in the plugin zip. Do not call set_error_handler or ini_set('error_log') from a plugin on every request. Delete existing amego.log/error.log from deployed copies.

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.