search
HomePHP LibrariesOther librariesPHP 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 classPHP database processing encapsulation class

29May2018

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 classphp image processing class

04Jun2018

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 classPhp image processing class

23Nov2016

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<?php include "image.class.php"; $image=new image("2.png", 1, &qu...

php version processing classphp version processing class

08Aug2016

: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 classphp image processing method, php image processing class

25Jul2016

php image processing method, php image processing class

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

12Jul2016

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