通过WordPress插件接受PayPal付款

通过WordPress插件接受PayPal付款

问题描述:

I am currently developing a WordPress plugin that allows users to accept paid guest posts. The scenario goes like this: someone visits the website of the plugin user, creates a guest post which is saved as pending and finally makes a one-time payment via paypal. Once the payment has cleared the post is published on the website.

Basically I need a solution where the website owner can specify just his or her email or merchant ID in the plugin options panel to start accepting payments.

The problem is I'm a little lost as to which paypal api to use and how to get started. There is a lot of information on the paypal website and I'm feeling a bit overwhelmed. Could someone please point me in the right direction?

Thanks

我目前正在开发一个WordPress插件,允许用户接受付费的访客帖子。 场景如下:有人访问插件用户的网站,创建一个保存为待处理的客人帖子,最后通过paypal进行一次性付款。 付款结束后,该帖子将在网站上发布。 p>

基本上我需要一个解决方案,网站所有者可以在插件选项面板中指定他或她的电子邮件或商家ID以启动 接受付款。 p>

问题是我对使用哪种paypal api以及如何开始有点迷茫。 paypal网站上有很多信息,我感觉有点不知所措。 有人可以指出我正确的方向吗? p>

谢谢 p> div>

I would recommend using the Express Checkout API for something like that. Specifically, you'll be using SetExpressCheckout, GetExpressCheckoutDetails, and DoExpressCheckoutPayment as explained in that first link.

My PHP class library for PayPal will make those API calls very simple for you, and you could even take a look at my PayPal for WooCommerce plugin to get an idea of how to use the library within a plugin if you need to.