├── src ├── html │ ├── main_gdh.php │ ├── main_progress.php │ ├── main_property.php │ ├── main_seller.php │ ├── main_travel.php │ └── index.php └── api │ ├── payment │ ├── incomplete.php │ ├── cancel.php │ ├── approval.php │ └── complete.php │ ├── authenticate.php │ └── sdk.php ├── include └── app.php ├── SECURITY.md ├── README.md ├── index.php └── License.md /src/html/main_gdh.php: -------------------------------------------------------------------------------- 1 | main_gdh.php 2 | -------------------------------------------------------------------------------- /src/html/main_progress.php: -------------------------------------------------------------------------------- 1 | main_progress.php 2 | -------------------------------------------------------------------------------- /src/html/main_property.php: -------------------------------------------------------------------------------- 1 | main_property.php 2 | -------------------------------------------------------------------------------- /src/html/main_seller.php: -------------------------------------------------------------------------------- 1 | main_seller.php 2 | -------------------------------------------------------------------------------- /src/html/main_travel.php: -------------------------------------------------------------------------------- 1 | main_travel.php 2 | -------------------------------------------------------------------------------- /include/app.php: -------------------------------------------------------------------------------- 1 | 2 | require ROOT_SYSTEM. PHP_DS . "include". PHP_DS ."app.php"; 3 | 4 | $app = new App(); 5 | $app->start(); 6 | -------------------------------------------------------------------------------- /src/api/payment/incomplete.php: -------------------------------------------------------------------------------- 1 |
2 | include(dirname(dirname(__FILE__)). PHP_DS. 'sdk.php'); 3 | 4 | $pi = new PiNetwork(PI_API_KEY, ''); 5 | $ret = $pi->InCompletePayment($_POST); 6 | unset( $_SESSION['Order'] ); 7 | echo "Terima kasih, Transfer anda berhasil diproses"; 8 | ?>9 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | This section is to know which versions of our project are 6 | currently being supported with security updates. 7 | 8 | | Version | Supported | 9 | | ------- | ----------------------- | 10 | | 8.0.3 | Global-Link HTTP Server | 11 | | 1.0.1 | Global_Link PHP Module | 12 | | 4.0.x | Global-Link PHP Project | 13 | | 8.3.x | PHP | 14 | -------------------------------------------------------------------------------- /src/api/payment/cancel.php: -------------------------------------------------------------------------------- 1 | 2 | include(dirname(dirname(__FILE__)). PHP_DS. 'sdk.php'); 3 | 4 | $pi = new PiNetwork(PI_API_KEY, ''); 5 | $ret = $pi->CancelPayment($_POST); 6 | unset( $_SESSION['Order'] ); 7 | 8 | header("Content-Type: application/json; charset=utf-8"); 9 | $result=array(); 10 | $result["Kode"]=1; 11 | $result["Style"]="info"; 12 | $result["Title"]="Informasi"; 13 | $result["Message"]="Pembayaran Pi Network anda telah dibatalkan."; 14 | echo json_encode($result); 15 | -------------------------------------------------------------------------------- /src/api/payment/approval.php: -------------------------------------------------------------------------------- 1 | 2 | include(dirname(dirname(__FILE__)). PHP_DS. 'sdk.php'); 3 | 4 | $pi = new PiNetwork(PI_API_KEY, ''); 5 | $ret = $pi->ApprovalPayment($_POST); 6 | 7 | header("Content-Type: application/json; charset=utf-8"); 8 | $result=array(); 9 | $result["Kode"]=0; 10 | $result["Style"]="success"; 11 | $result["Title"]="Sukses"; 12 | $result["Message"]="Pembayaran Pi Sukses."; 13 | $result["PARAM"]=$_POST; 14 | 15 | $jsret=json_decode($ret, true); 16 | 17 | echo json_encode($result); 18 | 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PT. GOLDEN DIAMOND HARISA 2 | 3 | ### Description 4 | HARISA JEWELLERY Repository. An application in the Pi Ecosystem that can be used to become a Market Place. 5 | 6 | Built in PHP and JavaScript. Harisa Jewelery uses the Class Project developed by Global System Indonesia 7 | 8 | On the Harisa Jewelery Platform there is a business branch platform from PT. GOLDEN DIAMOND HARISA includes: 9 | 1. GDH Jewellery, provides sales of jewelry products. 10 | 2. GDH Car, provides sales of vehicle products. 11 | 3. GDH Fashion, selling branded products. 12 | 4. GDH Mart, serves sales of basic daily needs products. 13 | 5. GDH MSME Ecosystem, a GDH feature to support small and medium businesses so they can build an ecosystem under the auspices of PT. GDH 14 | 15 | 16 | ### LINK Project: 17 | - https://harisajewellery.com ( Mainnet ) 18 | - https://testnet.harisajewellery.com ( Testnet ) 19 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | define('PARENT_DIR', dirname(__FILE__)); 3 | 4 | define('TOP_DIR', PARENT_DIR); 5 | 6 | define('GLOBAL_ASSET', GLOBAL_SYSTEM . PHP_DS."global_assets" ); 7 | define('ROOT_SYSTEM', GLOBAL_SYSTEM . PHP_DS."global_assets". PHP_DS."system6" ); 8 | define('LOKAL_DIR', dirname(__FILE__). PHP_DS. "src" ); 9 | 10 | require GLOBAL_ASSET. PHP_DS . "include". PHP_DS ."init.php"; 11 | 12 | define('TEMPLATE', 'gdh_simple'); 13 | 14 | define('HAVE_LANG', 'en'); 15 | 16 | define('DEFAULT_COLOR', 'feeacb'); 17 | define('SYSTEM_COLOR', 'FF9378'); 18 | 19 | define('APP_DATABASE', 'gdh'); 20 | define('DB_ADMIN', 'gdh'); 21 | 22 | define('APP_SYSTEM', 'PT. GOLDEN DIAMOND HARISA' ); 23 | define('APP_NAME', 'PT. GOLDEN DIAMOND HARISA' ); 24 | define('APP_DESC', 'PT. GOLDEN DIAMOND HARISA: Toko Emas Berlian Harisa.' ); 25 | 26 | require PARENT_DIR. PHP_DS . "include". PHP_DS ."app.php"; 27 | -------------------------------------------------------------------------------- /src/api/authenticate.php: -------------------------------------------------------------------------------- 1 | 2 | $_SESSION['pi_auth'] = $_POST; 3 | $_SESSION['pi_accessToken'] = $_POST['accessToken']; 4 | 5 | if( (isset($_POST['user[username]'])) && (!isset($_POST['user']['username'])) ){ 6 | $_POST['user']['uid'] = $_POST['user[uid]']; 7 | $_POST['user']['username'] = $_POST['user[username]']; 8 | } 9 | 10 | if(!empty(trim($_POST['user']['username']))){ 11 | $_SESSION['pi_uid'] = $_POST['user']['uid']; 12 | $_SESSION['pi_username'] = $_POST['user']['username']; 13 | $testnet='1'; 14 | 15 | $cek = mysql_fetch_assoc(mysql_query("SELECT * from ".APP_DATABASE.".t_user WHERE username='{$_SESSION['pi_username']}' LIMIT 1")); 16 | if(empty($cek['username'])){ 17 | mysql_query("INSERT INTO ".APP_DATABASE.".t_user (username) VALUES('{$_SESSION['pi_username']}')"); 18 | } 19 | } 20 | 21 | $_POST['session_id']=my_session_id(); 22 | $_POST['session']=$_SESSION; 23 | 24 | header("Content-Type: application/json; charset=utf-8"); 25 | echo json_encode($_POST); 26 | ?> 27 | -------------------------------------------------------------------------------- /License.md: -------------------------------------------------------------------------------- 1 | PiOS License 2 | 3 | Copyright (C) 2023 PT. GOLDEN DIAMOND HARISA ( Global System Indonesia - Rokhmadi Safari ) 4 | 5 | Permission is hereby granted by the application software developer (“Software Developer”), free of charge, to any person obtaining a copy of this application, software and associated documentation files (the “Software”), which was developed by the Software Developer for use on Pi Network, whereby the purpose of this license is to permit the development of derivative works based on the Software, including the right to use, copy, modify, merge, publish, distribute, sub-license, andor sell copies of such derivative works and any Software components incorporated therein, and to permit persons to whom such derivative works are furnished to do so, in each case, solely to develop, use and market applications for the official Pi Network. For purposes of this license, Pi Network shall mean any application, software, or other present or future platform developed, owned or managed by Pi Community Company, and its parents, affiliates or subsidiaries, for which the Software was developed, or on which the Software continues to operate. However, you are prohibited from using any portion of the Software or any derivative works thereof in any manner (a) which infringes on any Pi Network intellectual property rights, (b) to hack any of Pi Network’s systems or processes or (c) to develop any product or service which is competitive with the Pi Network. 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS, PUBLISHERS, OR COPYRIGHT HOLDERS OF THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO BUSINESS INTERRUPTION, LOSS OF USE, DATA OR PROFITS) HOWEVER CAUSED AND UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE) ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 10 | 11 | Pi, Pi Network and the Pi logo are trademarks of the Pi Community Company. 12 | -------------------------------------------------------------------------------- /src/api/sdk.php: -------------------------------------------------------------------------------- 1 | 2 | class PiNetwork { 3 | var $baseUrl; 4 | var $headers = array(); 5 | var $compression; 6 | var $apiKey; 7 | var $wallet; 8 | 9 | function __construct($apiKey= string, $walletPrivateSeed= string) { 10 | $this->compression='gzip'; 11 | $this->apiKey=$apiKey; 12 | $this->wallet=$walletPrivateSeed; 13 | $this->baseUrl='https://api.minepi.com'; 14 | } 15 | 16 | function get($EndPoint) { 17 | $url= $this->baseUrl . "/v2/payments/" . $EndPoint; 18 | $process = curl_init($url); 19 | curl_setopt($process, CURLOPT_HTTPHEADER, $this->headers); 20 | curl_setopt($process, CURLOPT_TIMEOUT, 30); 21 | curl_setopt($process, CURLOPT_RETURNTRANSFER, 1); 22 | curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1); 23 | 24 | curl_setopt($process, CURLOPT_VERBOSE, false); 25 | curl_setopt($process, CURLOPT_SSL_VERIFYPEER, false); 26 | curl_setopt($process, CURLOPT_SSL_VERIFYHOST, false); 27 | curl_setopt($process, CURLOPT_SSL_VERIFYSTATUS, false); 28 | 29 | $return = curl_exec($process); 30 | curl_close($process); 31 | return $return; 32 | } 33 | 34 | function post($EndPoint,$data) { 35 | $url= $this->baseUrl . "/v2/payments/" . $EndPoint; 36 | $process = curl_init($url); 37 | 38 | curl_setopt($process, CURLOPT_HTTPHEADER, $this->headers); 39 | curl_setopt($process, CURLOPT_ENCODING , $this->compression); 40 | curl_setopt($process, CURLOPT_TIMEOUT, 30); 41 | curl_setopt($process, CURLOPT_POSTFIELDS, $data); 42 | curl_setopt($process, CURLOPT_RETURNTRANSFER, 1); 43 | curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1); 44 | 45 | curl_setopt($process, CURLOPT_VERBOSE, false); 46 | curl_setopt($process, CURLOPT_SSL_VERIFYPEER, false); 47 | curl_setopt($process, CURLOPT_SSL_VERIFYHOST, false); 48 | curl_setopt($process, CURLOPT_SSL_VERIFYSTATUS, false); 49 | 50 | curl_setopt($process, CURLOPT_POST, 1); 51 | $return = curl_exec($process); 52 | curl_close($process); 53 | return $return; 54 | } 55 | 56 | function ApprovalPayment($data) { 57 | $this->headers[] = "Authorization: key ".$this->apiKey; 58 | return $this->post($data['paymentId'].'/approve', ''); 59 | } 60 | 61 | function CancelPayment($data) { 62 | $this->headers[] = "Authorization: key ".$this->apiKey; 63 | return $this->post($data['paymentId'].'/cancel', ''); 64 | } 65 | 66 | function CompletePayment($data) { 67 | $this->headers[] = "Authorization: key ".$this->apiKey; 68 | $this->headers[] = 'Content-Type: application/json'; 69 | return $this->post($data['paymentId'].'/complete', '{"txid":"'.$data['txid'].'"}'); 70 | } 71 | 72 | function InCompletePayment($data) { 73 | $this->headers[] = "Authorization: key ".$this->apiKey; 74 | $this->headers[] = 'Content-Type: application/json'; 75 | return $this->post($data['identifier'].'/complete', '{"txid":"'.$data['transaction']['txid'].'"}'); 76 | } 77 | } 78 | 79 | -------------------------------------------------------------------------------- /src/html/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | if(!isset($_SESSION['Platform'])) 4 | $_SESSION['Platform']=10000; 5 | 6 | if(!isset($_SESSION['produk_list'])) 7 | $_SESSION['produk_list']=1; 8 | 9 | $st=''; 10 | $lnk=''; 11 | $mode='Testnet'; 12 | if(!strpos($_SERVER['SERVER_NAME'],'estnet.')){ 13 | $st='checked'; 14 | $lnk='testnet.'; 15 | $mode='Mainnet'; 16 | } 17 | if ( (isset($_SERVER['HTTP_X_CSRF_TOKEN'])) && (!empty($_SERVER['HTTP_X_CSRF_TOKEN'])) && (isset($_SESSION['Platform'])) ) { 18 | ?> 19 | 20 | 21 | } ?> 22 | 23 | 110 | 111 |