Linux 软件免费装
Banner图

MyOTP Phone Verification

开发者 rayasoren
更新时间 2026年9月30日 11:11
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

otp woocommerce whatsapp phone verification sms verification

下载

详情介绍:

MyOTP Phone Verification sends a one-time code to a visitor's phone and checks it before they can continue. It uses the MyOTP.App API (https://myotp.app), one key for SMS, WhatsApp and Telegram. What it does: How it stays safe: Both the classic (shortcode) checkout and the block checkout are supported. On the block checkout the plugin adds its widget under the phone field with a small script (no block to add in the editor) and validates when the order is placed. The block checkout's phone field must be shown: with the field hidden there is no number to verify and the order is refused. Express wallet buttons (Apple Pay, Google Pay, Link, Amazon Pay) from WooPayments and WooCommerce Stripe Payment Gateway place the order without the checkout form, so the shopper never sees the code box. Settings > MyOTP has one setting for them, "Apple Pay / Google Pay and other express wallet orders", with three choices: Other gateways can be added with the myotp_pv_express_wallet_gateways filter (gateway id => list of request fields that mark a wallet order) and myotp_pv_express_wallet_types. External service This plugin sends the phone number a visitor enters to the MyOTP.App API at https://api.myotp.app to deliver a one-time code and to check the code the visitor types. No other data is sent. MyOTP.App privacy policy: https://myotp.app/privacy-policy/. Terms: https://myotp.app/term-condition/. Data stored on your site Uninstalling removes the settings, the scheduled sweep, the counters, the pending records and the verified records. Order meta and user meta are part of your customer records and are kept. The plugin registers suggested text for your privacy policy under Settings > Privacy.

安装:

  1. Upload the myotp-phone-verification folder to /wp-content/plugins/, or upload the zip from Plugins > Add New > Upload Plugin.
  2. Activate the plugin.
  3. Sign up at https://myotp.app/sign-up/ and copy an API key from User API Keys in the dashboard.
  4. Go to Settings > MyOTP, paste the key, pick a channel and save.
  5. Send a test code to your own number from the same page.

屏幕截图:

  • Checkout billing phone with the Send code button.
  • Registration form with the phone field.

升级注意事项:

1.1.0 Adds WooCommerce block checkout support. Apple Pay and Google Pay orders are now allowed without a code by default; see the new express wallet setting to hold them for verification after payment or to block them as before. 1.0.0 First release.

常见问题:

What format do phone numbers need?

Country code first, digits only, no plus sign. 14155550123, not +1 (415) 555-0123. The plugin strips spaces, dashes and the plus sign before sending.

Does it work with the WooCommerce block checkout?

Yes, from 1.1.0. The Send code button appears under the phone field and the order is refused until that number is verified, same as the classic [woocommerce_checkout] page. For a returning shopper whose saved address is shown as a card with an Edit link, the Send code button sits right under that card and sends to the saved phone number. If the saved address has no phone number, pressing Send code (or a refused Place order) opens the address form at the phone field. Keep the phone field visible in the checkout block; with it hidden there is nothing to verify.

Can shoppers pay with Apple Pay or Google Pay?

Yes. Wallet buttons skip the checkout form, so pick what happens to those orders under "Apple Pay / Google Pay and other express wallet orders" in Settings > MyOTP: allow them without a code (the default), hold them until the shopper verifies the order's phone after paying, or block them. The plugin recognises wallet orders from WooPayments and WooCommerce Stripe Payment Gateway; any other request goes through the normal code check.

Can a shopper skip the code by pretending to use a wallet?

Not with another payment method. A wallet order is recognised only when the chosen payment method is one of the wallet gateways (WooPayments or WooCommerce Stripe Payment Gateway) and the request carries that gateway's wallet marker. The same marker sent with cash on delivery, bank transfer or any other gateway is ignored and the code is required. The plain limit: those markers come from the shopper's browser. Someone who edits the request by hand can send a wallet marker while paying with an ordinary card through WooPayments or Stripe, and the order is then treated as a wallet order (placed without a code, or held until verified, depending on the setting). They still had to pay through that gateway, with the gateway's own fraud checks. If you need every order verified with no exception, choose "Ask for the code after payment" or "Block".

Why is the phone field required at checkout now?

A number that is not there cannot be verified. While verification is on (and, with "Only for guests", for guests), the plugin shows WooCommerce's checkout phone field as required on both the block and the classic checkout, even when WooCommerce's own setting says optional. Your WooCommerce setting is not changed; Settings > MyOTP says when it is being overridden.

Can logged-in customers skip verification?

Yes. Tick "Only for guests" under WooCommerce checkout in Settings > MyOTP.

How do I react to a successful verification from the shortcode?

Listen for the event: document.addEventListener('myotp:verified', function (e) { console.log(e.detail.phone); });

I am behind a reverse proxy or CDN. Does the per-IP limit work?

The plugin reads REMOTE_ADDR only, because forwarding headers can be forged by the client. Behind a proxy that address may be the proxy itself, so every visitor shares one per-IP bucket and the site-wide hourly ceiling is the real backstop. If your host guarantees a trusted header, return the real address from the myotp_pv_client_ip filter.

A shopper says the code never arrives. Where do I look?

Shoppers only ever see a short message asking them to try again or contact the shop; the verification service's own error text is not shown to them. The detail goes to WooCommerce > Status > Logs (source myotp-phone-verification) and to a notice in the WordPress admin for a day, with phone numbers removed. A common cause is the Brand setting: it must be 3 to 16 letters or digits, with no spaces.

Does each test send cost credits?

Yes. A test send is a real send.

Where does the API key live?

In the myotp_pv_options option, on the server only. It is shown masked on the settings page and removed on uninstall.

更新日志:

1.1.0 1.0.0