# payssion-php **Repository Path**: jieyang/payssion-php ## Basic Information - **Project Name**: payssion-php - **Description**: payssion.com sdk composer require jieyang/payssion-php - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: dev - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2023-06-11 - **Last Updated**: 2023-06-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README payssion-php ============ ##Prerequisites * PHP 5.3 or above * curl, json & openssl extensions must be enabled ##Usage ``` php $payssion = new PayssionClient('your api key', 'your secretkey'); //please uncomment the following if you use sandbox api_key //$payssion = new PayssionClient('your api key', 'your secretkey', false); $response = null; try { $response = $payssion->create(array( 'amount' => 1, 'currency' => 'USD', 'pm_id' => 'alipay_cn', 'order_id' => 'your order id', //your order id 'return_url' => 'your return url' //optional, the return url after payments (for both of paid and non-paid) )); } catch (Exception $e) { //handle exception echo "Exception: " . $e->getMessage(); } if ($payssion->isSuccess()) { //redirect the users to the payment URL $payment_url = $response['redirect_url']; } else { //handle failure } ``` PAYSSION PHP library