Skip to content

Version 2.1.0

Latest

Choose a tag to compare

@codenashwan codenashwan released this 28 Oct 12:01

✨ What's New

🔧 Core Improvements

  • Complete code refactoring with clean PHP 8.1+ syntax
  • Zero comments - Self-documenting, readable code
  • Performance optimizations for faster API calls
  • Enhanced error handling with comprehensive exception methods

🚀 New Features

  • Timeout configuration support via OTPIQ_TIMEOUT
  • Enhanced exception handling with new helper methods:
    • isRateLimitError() - Detect rate limit errors
    • isTrialModeError() - Detect trial mode restrictions
    • isSpendingThresholdError() - Detect spending limit errors
    • isSenderIdError() - Detect sender ID issues
    • getRemainingCredit() - Get remaining credit balance
    • getRequiredCredit() - Get required credit amount
    • getRateLimitWaitMinutes() - Get rate limit wait time

📚 Documentation

  • Complete README rewrite with comprehensive examples
  • Full API reference for all methods
  • Error handling guide with practical examples
  • 3 SMS types fully documented:
    • Verification codes
    • Custom messages
    • WhatsApp templates
  • Webhook integration guide
  • Tinker testing examples

🛠️ Technical Improvements

  • Improved response body handling with getContents()
  • Better base URL normalization
  • Enhanced JSON decoding with fallback
  • Cleaner request method implementation

📋 Requirements

  • PHP 8.1, 8.2, 8.3, or 8.4
  • Laravel 10, 11, or 12
  • Guzzle HTTP 7.0+