Table of Contents
回复讨论(解决方案)
Home Backend Development PHP Tutorial PHP支付宝接口支付功能可以实现,但是中间出现一个空白页面,里面是一个按钮,我现在想去掉这个按钮求教

PHP支付宝接口支付功能可以实现,但是中间出现一个空白页面,里面是一个按钮,我现在想去掉这个按钮求教

Jun 23, 2016 pm 02:00 PM

如题, 我做了一个PHP的支付宝功能,现在支付可以正常使用,但是中间会有一个空白页面,上面有个确认按钮,这个确认按钮不用点击就自动跳转到支付页面了。 我想这个空白的页面也没什么用, 就想把它去掉,直接跳转到支付宝的支付页面,下面的代码是出现这个按钮的代码,

//建立请求		$alipaySubmit = new AlipaySubmit($alipay_config);		$html_text = $alipaySubmit->buildRequestForm($parameter,"post", "确认");		echo $html_text;
Copy after login

但是去掉这个代码就不能跳转到支付页面了,所以请假一下大家


回复讨论(解决方案)

看代码像是构建了一个自动提交的表单,通过POST方式提交到支付宝的接口去
buildRequestForm,看一下这个方法,里面应该是一个构建表单项,并且带有document.表单名.submit();之类自动提交表单的代码,也许还带有延时处理的代码。找到按钮的HTML,给按钮添加隐藏的样式,同时修改延时的代码让自动提交立刻生效应该就可以满足你的要求了

在buildRequestForm方法里直接去掉那个确认按钮就行了。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article

Hot Article

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

11 Best PHP URL Shortener Scripts (Free and Premium) 11 Best PHP URL Shortener Scripts (Free and Premium) Mar 03, 2025 am 10:49 AM

11 Best PHP URL Shortener Scripts (Free and Premium)

Working with Flash Session Data in Laravel Working with Flash Session Data in Laravel Mar 12, 2025 pm 05:08 PM

Working with Flash Session Data in Laravel

6 Extra Skills Every PHP Developer Should Have 6 Extra Skills Every PHP Developer Should Have Feb 28, 2025 am 10:52 AM

6 Extra Skills Every PHP Developer Should Have

Understand Arrays in PHP Understand Arrays in PHP Feb 28, 2025 am 10:53 AM

Understand Arrays in PHP

Simplified HTTP Response Mocking in Laravel Tests Simplified HTTP Response Mocking in Laravel Tests Mar 12, 2025 pm 05:09 PM

Simplified HTTP Response Mocking in Laravel Tests

Build a React App With a Laravel Back End: Part 2, React Build a React App With a Laravel Back End: Part 2, React Mar 04, 2025 am 09:33 AM

Build a React App With a Laravel Back End: Part 2, React

cURL in PHP: How to Use the PHP cURL Extension in REST APIs cURL in PHP: How to Use the PHP cURL Extension in REST APIs Mar 14, 2025 am 11:42 AM

cURL in PHP: How to Use the PHP cURL Extension in REST APIs

12 Best PHP Chat Scripts on CodeCanyon 12 Best PHP Chat Scripts on CodeCanyon Mar 13, 2025 pm 12:08 PM

12 Best PHP Chat Scripts on CodeCanyon

See all articles