Home PHP Libraries Other libraries PHP Alipay notification processing class
PHP Alipay notification processing class
<?php
class AlipayNotify {
  var $https_verify_url = 'https://mapi.alipay.com/gateway.do?service=notify_verify&';
  var $http_verify_url = 'http://notify.alipay.com/trade/notify_query.do?';
  var $alipay_config;
  function __construct($alipay_config){
    $this->alipay_config = $alipay_config;
  }
  function AlipayNotify($alipay_config) {
    $this->__construct($alipay_config);
  }
  function verifyNotify(){
    if(empty($_POST)) {//判断POST来的数组是否为空
      return false;
    }

This is to verify the address in the form of HTTPS message and then use notify_url to verify whether the message is a legitimate message sent by Alipay, judge whether the array from POST is empty, and obtain the ATN result of the Alipay remote server (verify whether it is a message sent by Alipay).

Disclaimer

All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn

Related Article

PHP database processing encapsulation class PHP database processing encapsulation class

29 May 2018

This article mainly introduces the PHP database processing encapsulation class, and analyzes PHP's database connection, addition, deletion, modification and other operations based on mysqli encapsulation in the form of a complete example. Friends in need can refer to the following

php image processing class php image processing class

04 Jun 2018

This article mainly introduces the PHP image processing class. Interested friends can refer to it. I hope it will be helpful to everyone.

Php image processing class Php image processing class

23 Nov 2016

I wrote an image processing class before, which is different from what exists on the Internet. This class has only one public method. By passing different values ​​​​to the $type parameter when instantiating the object, different functions can be achieved. Currently, only three functions are implemented: 1: Image scaling, 2: Image cropping, 3: Add image watermark&lt;?php include "image.class.php"; $image=new image("2.png", 1, &qu...

php version processing class php version processing class

08 Aug 2016

:This article mainly introduces the PHP version processing class. Students who are interested in PHP tutorials can refer to it.

php image processing method, php image processing class php image processing method, php image processing class

25 Jul 2016

php image processing method, php image processing class

PHP image processing class library and demonstration sharing, php image processing class library_PHP tutorial PHP image processing class library and demonstration sharing, php image processing class library_PHP tutorial

12 Jul 2016

PHP image processing class library and demonstration sharing, PHP image processing class library. PHP image processing class library and demonstration sharing, PHP image processing class library I simply wrote a PHP image processing class library. Although it has relatively few functions, it is not too advanced at present and will be used in the future.

See all articles