Refer to the code of alipay web payment interface
In fact, the principle is similar to the alipay payment integrated on ecshop. It is because the response time when using curl request is too long, so you cannot directly post the data first and then generate the button.
- if (isset($set_modules) && $set_modules == TRUE)
- {
- $i = isset($modules) ? count($modules) : 0;
-
- /* Code*/
- $modules[$ i]['code'] = basename(__FILE__, '.php');
-
- /* Describe the corresponding language item*/
- $modules[$i]['desc'] = 'alipay_mobile_desc';
-
- /* Whether to support cash on delivery*/
- $modules[$i]['is_cod'] = '0';
-
- /* Whether to support online payment*/
- $modules[$i]['is_online'] = '1' ;
-
- /* Author*/
- $modules[$i]['author'] = 'luoluo';
-
- /* URL*/
- $modules[$i]['website'] = ALIPAY_WEBSITE_URL;
-
- / * Version number*/
- $modules[$i]['version'] = '1.0.2';
-
- /* Configuration information*/
- $modules[$i]['config'] = array(
- array( 'name' => 'alipay_account', 'type' => 'text', 'value' => ''),
- array('name' => 'alipay_key', 'type' => ' text', 'value' => ''),
- array('name' => 'alipay_partner', 'type' => 'text', 'value' => ''),
- );
-
- return;
- }
Copy code
|