Linux 软件免费装
Banner图

HantarSMS – OTP & Marketing SMS for Malaysia

开发者 imeiie1231
更新时间 2026年10月24日 04:16
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

otp woocommerce sms sms marketing malaysia

下载

1.0.0

详情介绍:

HantarSMS connects your WordPress site to HantarSMS, a Malaysian SMS service that sends from a short code to Maxis, CelcomDigi, U Mobile, Unifi Mobile and YES numbers. Prepaid, from RM0.20 per SMS, no monthly fee. One plugin covers the three reasons a Malaysian site sends SMS: 1. OTP verification codes 2. WooCommerce order SMS 3. SMS marketing campaigns Also included Numbers can be typed in any Malaysian format: 0123456789, 012-345 6789, 60123456789 or +60123456789. Only Malaysian mobile numbers are supported.

安装:

  1. Install and activate the plugin.
  2. Create a HantarSMS account at https://hantarsms.com/ and add credit. New accounts can ask for free trial credit on WhatsApp.
  3. In the HantarSMS console, open API keys and create a key.
  4. In WordPress, go to HantarSMS → Settings, paste the key and save. Send yourself a test SMS.
  5. Turn on what you need: OTP login, WooCommerce order SMS, and under Marketing create the unsubscribe page.
You can also put the key in wp-config.php instead of the database: define( 'HANTARSMS_API_KEY', 'sk_live_...' );

屏幕截图:

  • Review screen before a campaign is sent.
  • WooCommerce order SMS templates.
  • Log in with an SMS code.
  • SMS log.

常见问题:

Which numbers can I send to?

Malaysian mobile numbers only (60 1X…). Numbers in other formats are skipped and shown as invalid before you send.

How much does it cost?

You pay HantarSMS per SMS segment, from RM0.20, from prepaid credit that does not expire. The plugin itself is free. One segment holds 156 characters of plain English, or 66 characters if the message contains Chinese, emoji or other special characters. The send screen shows the segment count and estimated cost before you confirm. See https://hantarsms.com/en/pricing.

Can recipients reply, or reply STOP?

No. Messages come from a shared, send-only short code (66886). That is why the plugin has an unsubscribe page, and why every message should start with your business name.

Do I need consent to send marketing SMS?

Yes. Under Malaysia's Personal Data Protection Act you need consent for direct marketing and must stop when someone asks. The plugin only sends campaigns to people who ticked the consent box (or to a list you confirm has consented), and always removes unsubscribed numbers. Order updates and OTP codes are not marketing.

How do users log in with an SMS code?

Their number must be saved on their account: the "Mobile number (SMS)" field on the WordPress profile, or the WooCommerce billing phone. If two accounts share a number, SMS login is refused for that number.

Can I use the OTP functions in my own forms?

Yes: $sent = hantarsms_otp_send( $phone, 'my-form' ); $ok = hantarsms_otp_verify( $phone, $code, 'my-form' ); Both return true or a WP_Error. The purpose ('my-form') makes sure a code sent for one form cannot be used in another.

My site is behind Cloudflare or a proxy. Are the IP limits correct?

By default the plugin uses REMOTE_ADDR, because forwarded headers can be forged. If your server sees the proxy's address, return the real visitor IP with the hantarsms_client_ip filter.

Where are delivery reports?

The plugin log shows whether HantarSMS accepted each send. Per-number delivery results are in your HantarSMS console.

更新日志:

1.0.0