After jumping to the payment page, Alipay's checkout prompts:
There is a risk of phishing in payment
Is it wrong: AE130001040
The corresponding page was found: https://cshall.alipay.com/enterprise/help_detail.htm?help_id =474059
In the place where the payment page jump is initiated, add the parameter "anti_phishing_key" and assign the value to
'anti_phishing_key' => urlencode($this->query_timestamp()),
/** * 用于防钓鱼,调用接口query_timestamp来获取时间戳的处理函数 * 注意:该功能PHP5环境及以上支持,因此必须服务器、本地电脑中装有支持DOMDocument、SSL的PHP配置环境。建议本地调试时使用PHP开发软件 * return 时间戳字符串 */privatefunction query_timestamp() {
$url = $this->alipay_gateway_new . "service=query_timestamp&partner=" . trim(strtolower($this->payment['payment_config']['alipay_partner'])) . "&_input_charset=" . trim(strtolower(CHARSET));$encrypt_key = "";$doc = newDOMDocument();$doc->load($url);$itemEncrypt_key = $doc->getElementsByTagName("encrypt_key");$encrypt_key = $itemEncrypt_key->item(0)->nodeValue;return$encrypt_key;
}
The above has introduced the anti-phishing era of Alipay payment development, including anti-phishing content. I hope it will be helpful to friends who are interested in PHP tutorials.