Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added SmsGlobal messaging adapter #40

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

biswajit287
Copy link

@biswajit287 biswajit287 commented Oct 4, 2023

What does this PR do?

This Pull Request (PR) adds an SmsGlobal messaging adapter along with tests.

Test Plan

  1. Create Your SmsGlobal Account

  2. Obtain API Key and API Secret

    • Log in to your SmsGlobal dashboard and go to "REST API Keys" under Integrations.
    • Retrieve your API key and API secret from this section.
  3. Enable Sandbox (For Testing)

    • To enable the sandbox for testing, you may need to contact the SmsGlobal support team. Detailed information can be found in their knowledge base.
  4. Set Environment Variables and Run E2E Tests

    • Before running end-to-end (E2E) tests, make sure you have the following environment variables set:

      • SMS_GLOBAL_API_KEY
      • SMS_GLOBAL_API_SECRET
      • SMS_GLOBAL_TO
      • SMS_GLOBAL_FROM
    • Execute the following command to run the E2E tests:

      ./vendor/bin/phpunit --verbose tests/e2e/SMS/SmsGlobalTest.php

Note: Please ensure that your server/machine time is synchronized with the Unix timestamp, as authentication may fail otherwise.

Screenshots
SmsGlobal Test result

From SmsGlobal dashboard
SmsGlobal Dashboard Test result

Related PRs and Issues

Closes appwrite/appwrite#6403

Have you read the Contributing Guidelines on issues?

Yes

$this->assertArrayHasKey('messages', $result);
$this->assertEquals(count($to), count($result['messages']));

// $dummyResponseStructure = '{"messages":[{"id":"154","outgoing_id":1,"origin":"origin","destination":"destination","message":"Test Content","status":"sent","dateTime":""}]}';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this comment if it's not needed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @gewenyu99, removed the comment.

@stnguyen90 stnguyen90 self-requested a review October 5, 2023 15:36
Copy link
Contributor

@stnguyen90 stnguyen90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you please make sure to address the linting problems?

@biswajit287
Copy link
Author

Would you please make sure to address the linting problems?

Hi @stnguyen90, resolved the linting problems.

Copy link
Contributor

@stnguyen90 stnguyen90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey 👋 awesome work on your PR! We've approved your work and it'll be merged soon!

src/Utopia/Messaging/Adapters/SMS/SmsGlobal.php Outdated Show resolved Hide resolved
@gewenyu99
Copy link

Hey there! There were a lot of big PRs during this Hacktoberfest, and we wanted to give everyone ample time to collaborate with our engineering team. If you were able to merge your PRs during October, amazing. If it’s still not merged, don’t worry about it either. Either way, we’ve got your Hacktoberfest swag minted and ready to ship.

Please comment with your Discord username here so we can contact you about your shipping information to deliver your Hacktoberfest swag.

@biswajit287
Copy link
Author

Hi @gewenyu99,

My discord username is biswajit27

@gewenyu99
Copy link

Will reach out soon! Compiling everyone's user names. Appreciate your patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

💬 Improve Appwrite Messaging with SmsGlobal Adapter
3 participants