-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from xendit/fix/qr-code-static
fix(qr code): Static method for get function
- Loading branch information
Showing
1 changed file
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,20 +3,20 @@ | |
/** | ||
* QRCode.php | ||
* php version 7.2.0 | ||
* | ||
* | ||
* @category Class | ||
* @package Xendit | ||
* @author Dave <[email protected]> | ||
* @license https://opensource.org/licenses/MIT MIT License | ||
* @link https://api.xendit.co | ||
* @link https://api.xendit.co | ||
*/ | ||
namespace Xendit; | ||
|
||
use Xendit\Exceptions\InvalidArgumentException; | ||
|
||
/** | ||
* Class QRCode | ||
* | ||
* | ||
* @category Class | ||
* @package Xendit | ||
* @author Dave <[email protected]> | ||
|
@@ -29,7 +29,7 @@ class QRCode | |
|
||
/** | ||
* Instantiate base URL | ||
* | ||
* | ||
* @return string | ||
*/ | ||
public static function classUrl() | ||
|
@@ -44,9 +44,9 @@ public static function classUrl() | |
* Required parameters: external_id, type, callback_url, amount. | ||
* For DYNAMIC QR Code type, amount is required. | ||
* For STATIC QR Code type, amount will be ignored. | ||
* | ||
* | ||
* To create QR Code for a Xenplatform sub-account, include for-user-id in $params | ||
* | ||
* | ||
* Please refer to this documentation for more detailed info | ||
* https://xendit.github.io/apireference/#create-qr-code | ||
* | ||
|
@@ -94,7 +94,7 @@ public static function create($params = []) | |
* Get QR Code | ||
* | ||
* Get a QR Code by its external_id | ||
* | ||
* | ||
* Please refer to this documentation for more detailed info | ||
* https://xendit.github.io/apireference/#get-qr-code-by-external-id | ||
* | ||
|
@@ -112,10 +112,10 @@ public static function create($params = []) | |
* ] | ||
* @throws Exception\ApiException | ||
**/ | ||
public function get(string $external_id) | ||
public static function get(string $external_id) | ||
{ | ||
$url = static::classUrl(). '/' . $external_id; | ||
|
||
return static::_request('GET', $url); | ||
} | ||
} | ||
} |