dongxiong2000 2016-08-16 09:28
浏览 24

PayPal php和WordPress

A few years ago I created a test web site that included the files from this tutorial - PayPal Express Checkout with PHP by Sanwebe, although I only used it in Sandbox mode it seemed to work fine.

Recently, I decided to revisit the project, though this time around develop it using WordPress (Version 4.5.3), and ran into problems.

In the original site I put all the files into the root directory then kicked off the process by using -

<form method="post" action="process.php?paypal=checkout">
  <input type="hidden" name="itemname" value="Product One" /> 
  <input type="hidden" name="itemnumber" value="1" /> 
  <input type="hidden" name="itemprice" value="1.50" />
  <input type="hidden" name="itemQty" value="1" /> 
  <input class="button medium green" type="submit"    name="submitbutt" value="Download " />
</form>

in the product page. The action call to process.php?paypal=checkoutlooked up the process.php file in the root folder and carried the paypal=checkout function, great.

However, using the same form in a WordPress product page fails, as it tries to find http://website.com/product/process.php?paypal=checkout rather than looking up the process.php file.

After spending a couple of weeks searching Stack Overflow and WordPress Support, as well as general web searches, I'm stuck.

So far I have tried -

  1. Including the files in the root directory as before - didn't work.
  2. Including the files in the theme directory as before - didn't work.
  3. Including the files in the child-theme directory as before - didn't work.
  4. Tried using get_template_part() - didn't work.
  5. Tried using include('path/to/folder/my_script.php');, include_once(), require()
  6. Tried using include (TEMPLATEPATH . '/mypage.php');
  7. Tried adding the process.php into both the theme and child-theme functions.php files
  8. I even tried creating a Plugin, but that also failed, maily because I'm rubbish.

Any assistance would be greatly appreciated.

Thanks

</div>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
    • ¥30 深度学习,前后端连接
    • ¥15 孟德尔随机化结果不一致
    • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
    • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
    • ¥15 谁有desed数据集呀
    • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
    • ¥15 关于#hadoop#的问题
    • ¥15 (标签-Python|关键词-socket)
    • ¥15 keil里为什么main.c定义的函数在it.c调用不了