Omnipay\Alipay\Common\Signer::getContentToSign PHP Method

getContentToSign() public method

public getContentToSign ( )
    public function getContentToSign()
    {
        $params = $this->getParamsToSign();
        if ($this->encodePolicy == self::ENCODE_POLICY_QUERY) {
            return urldecode(http_build_query($params));
        } elseif ($this->encodePolicy == self::ENCODE_POLICY_JSON) {
            return json_encode($params);
        } else {
            return null;
        }
    }

Usage Example

Example #1
0
 public function testGetContentToSign()
 {
     $params1 = ['bbb' => '2222', 'ccc' => '3333', 'aaa' => '111', 's' => '"."', 'e' => '', 'apple' => 'jobs'];
     $signer = new Signer($params1);
     $signer->setIgnores(['apple']);
     $content = $signer->getContentToSign();
     $this->assertEquals('aaa=111&bbb=2222&ccc=3333&s="."', $content);
 }
All Usage Examples Of Omnipay\Alipay\Common\Signer::getContentToSign