Skip to content

Commit

Permalink
Merge pull request #14 from calc2te/master
Browse files Browse the repository at this point in the history
Support laravel10 and php8.2
  • Loading branch information
comento authored Nov 28, 2023
2 parents b414ea8 + febfd1d commit ccb93b3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
"require": {
"php": ">=7.2",
"ext-json": "*",
"ext-mbstring": "*",
"guzzlehttp/guzzle": "^6.0|^7.0",
"illuminate/notifications": "~6.0 || ~7.0 || ~8.0 || ~9.0",
"illuminate/support": "~6.0 || ~7.0 || ~8.0 || ~9.0"
"illuminate/notifications": "~6.0 || ~7.0 || ~8.0 || ~9.0 || ~10.0",
"illuminate/support": "~6.0 || ~7.0 || ~8.0 || ~9.0 || ~10.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0"
"phpunit/phpunit": "^9.0 || ^10.0"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/SensAlimtalk.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ private function signature() : string
$buffer[] = strtoupper($this->method) . ' ' . $this->targetURL;
$buffer[] = $this->timestamp;
$buffer[] = $this->accessKey;
$secretKey = utf8_encode($this->secretKey);
$message = utf8_encode(implode("\n", $buffer));
$secretKey = mb_convert_encoding($this->secretKey, 'UTF-8', mb_list_encodings());
$message = mb_convert_encoding(implode("\n", $buffer), 'UTF-8', mb_list_encodings());
$hash = hex2bin(hash_hmac('sha256', $message, $secretKey));

return base64_encode($hash);
Expand Down
2 changes: 1 addition & 1 deletion src/SensAlimtalkMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class SensAlimtalkMessage
public $variables;
public $utmSource;
public $custom_pattern = '/#{\w.+}/';
public $messages = [];

/**
* SensAlimtalkMessage constructor.
Expand All @@ -26,7 +27,6 @@ public function __construct()
{
$this->plusFriendId = config('sens-alimtalk.plus_friend_id');
$this->countryCode = '+82';
$this->messages = [];
}

/**
Expand Down

0 comments on commit ccb93b3

Please sign in to comment.