如何在 PHP 的 Web 应用程序中集成 MoneyBookers?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1544016/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 03:01:24  来源:igfitidea点击:

How to integrate MoneyBookers in Web application in PHP?

phppayment-gatewayskrillmoneybookers

提问by Nishant Shrivastava

I am creating a PHP website, and need to integrate MONEYBOOKERs as the payment gateway.

我正在创建一个 PHP 网站,需要将 MONEYBOOKER 集成为支付网关。

Need help in embedding the MoneyBookers gateway to my site. As I am using the test link (sandbox URL) which is:

需要帮助将 MoneyBookers 网关嵌入我的网站。因为我正在使用测试链接(沙箱 URL),它是:

https://www.moneybookers.com/app/test_payment.pl

https://www.moneybookers.com/app/test_payment.pl

The problem which I am facing is, MONEYBOOKERs is not showing any transtion while testing it.

我面临的问题是,MONEYBOOKERs 在测试时没有显示任何转换。

Please Help!

请帮忙!

回答by Wyatt O'Day

I cover this topic in detail on a recent blog post of mine: How to automate Moneybookers (Skrill) using status_url (IPN). There is example code for PHP and C# and pictures illustrating the points:

我在我最近的一篇博客文章中详细介绍了这个主题:如何使用 status_url (IPN) 自动化 Moneybookers (Skrill)。有 PHP 和 C# 的示例代码和说明要点的图片:

  1. Signup for a Moneybookers test account
  2. Create a “secret word”
  3. Create your own payment form (with your logo on the Moneybookers checkout page)
  4. Verify the Moneybookers order
  1. 注册 Moneybookers 测试账户
  2. 创造一个“秘密词”
  3. 创建您自己的付款表格(在 Moneybookers 结帐页面上带有您的徽标)
  4. 验证 Moneybookers 订单

I won't cover every step here, because if I did my answer would take up several pages. However I will cover the 4th topic (verifying the Moneybookers order) because the answer currently on this page is riddled with problems (SQL injections, etc.). If you want in-detail instructions for every step then read my article.

我不会在这里介绍每一步,因为如果我这样做了,我的答案会占用好几页。但是,我将介绍第 4 个主题(验证 Moneybookers 订单),因为此页面上当前的答案充满了问题(SQL 注入等)。如果您想了解每一步的详细说明,请阅读我的文章

Simple payment form on your website

您网站上的简单付款表格

I go into this in more detail in the article, but here's a simple payment form. Replace the bold values with your correct prices, app name, and Moneybookers email:

在文章中更详细地介绍了这一点,但这里有一个简单的付款表格。用正确的价格、应用程序名称和 Moneybookers 电子邮件替换粗体值:


<form action="https://www.moneybookers.com/app/payment.pl" method="post">
  <input type="hidden" name="pay_to_email" value="[email protected]"/>
  <input type="hidden" name="status_url" value="http://example.com/verify.php"/> 
  <input type="hidden" name="language" value="EN"/>
  <input type="hidden" name="amount" value="Total amount (e.g. 39.60)"/>
  <input type="hidden" name="currency" value="Currency code (e.g. USD)"/>
  <input type="hidden" name="detail1_description" value="YourApp"/>
  <input type="hidden" name="detail1_text" value="License"/>
  <input type="submit" value="Pay!"/>
</form>

Verifying the Moneybookers order

验证 Moneybookers 订单

After a user has paid for your software, eBook, or other digital content you'll want to automatically verify the order and send what they ordered to their email address. In this example I mention creating a product key using LimeLM, but you can really do anything.

在用户为您的软件、电子书或其他数字内容付款后,您需要自动验证订单并将他们订购的内容发送到他们的电子邮件地址。在这个例子中,我提到使用 LimeLM 创建一个产品密钥,但你真的可以做任何事情。

In the example form above you set the location of script that will verify the Moneybookers orders:

在上面的示例表单中,您设置将验证 Moneybookers 订单的脚本的位置:


<input type="hidden" name="status_url" value="http://example.com/verify.php"/> 

The relevant part of the script is this:

脚本的相关部分是这样的:


// Validate the Moneybookers signature
$concatFields = $_POST['merchant_id']
    .$_POST['transaction_id']
    .strtoupper(md5('Paste your secret word here'))
    .$_POST['mb_amount']
    .$_POST['mb_currency']
    .$_POST['status'];

$MBEmail = '[email protected]';

// Ensure the signature is valid, the status code == 2,
// and that the money is going to you
if (strtoupper(md5($concatFields)) == $_POST['md5sig']
    && $_POST['status'] == 2
    && $_POST['pay_to_email'] == $MBEmail)
{
    // Valid transaction.

    //TODO: generate the product keys and
    //      send them to your customer.
}
else
{
    // Invalid transaction. Bail out
    exit;
}

If you don't know how to set your secret word in Moneybookers, I explain how to do this in the " How to automate Moneybookers (Skrill) using status_url (IPN)" article.

如果您不知道如何在 Moneybookers 中设置您的密码,我将在“如何使用 status_url (IPN) 自动化 Moneybookers (Skrill)”一文中解释如何执行此操作

Full payment example

全额付款示例

If you're not keen on writing this code yourself then we have a fully built payment form for our LimeLMcustomers. It's written for PHP, C#, and VB.NET and it's free for all our customers (even our free-users). So you can download it, integrate it into your site, and use it without paying us a cent.

如果您不热衷于自己编写此代码,那么我们为LimeLM客户提供了一个完整的付款表格。它是为 PHP、C# 和 VB.NET 编写的,对我们所有的客户(甚至我们的免费用户)都是免费的。因此,您可以下载它,将其集成到您的网站中,并且无需支付我们一分钱即可使用它。

Here's what the payment selection pagelooks like:

下面介绍一下支付选择页面的样子:

enter image description here

enter image description here

回答by 5377037

Skrill is not using Moneybooker, now it has changed its test payment method. Documented here Page # 13 ( 2.3.2 ): https://www.skrill.com/fileadmin/content/pdf/Skrill_Quick_Checkout_Guide.pdf

Skrill 没有使用 Moneybooker,现在它改变了它的测试付款方式。此处记录第 13 页(2.3.2):https: //www.skrill.com/fileadmin/content/pdf/Skrill_Quick_Checkout_Guide.pdf

Use below Merchant Test Accounts provided by Skrill:

使用 Skrill 提供的以下商家测试账户:

enter image description here

enter image description here

C# Code:

C# 代码:

string url = "https://pay.skrill.com/?";

// Merchant Details
url += "pay_to_email=" + "[email protected]";
url += "&recipient_description=" + "Your Project Title";
url += "&language=" + "EN";
url += "&transaction_id=" + "Your Transaction ID";
url += "&return_url=" + "Your Return URL After Successful Payment";

// Payment Details
url += "&amount=" + "Your Total Amount";
url += "&currency=" + "USD";
url += "&amount2_description=" + "Item Price:"; // item name
url += "&amount2=" + "Your Price Here"; // place price 
url += "&amount3_description=" + "Quantity:";
url += "&amount3=" + "Your Quantity Here";
url += "&amount4_description=" + "Tax:";
url += "&amount4=" + "Your Tax Here";
url += "&detail1_description=" + "Order ID:";
url += "&detail1_text=" + "Your Order_ID Here";
url += "&detail2_description=" + "Description:";
url += "&detail2_text=" + "Description of product";
url += "&detail3_description=" + "Product ID:";
url += "&detail3_text=" + "Your Product_ID here";
url += "&detail4_description=" + "Order Date:";
url += "&detail4_text=" + "Order Date here";

// Split Gateway
// If Payment method not set then skrill will automatically select methods in your country
//url += "&payment_methods=" + "WLT,ACC"; // Skrill, Credit/Debit Cards

// redirects to Skrill
Response.Redirect(url)

For test payment use below test cards numbers after redirecting to Skrill:

对于重定向到 Skrill 后的测试付款,请使用以下测试卡号:

enter image description hereNOTE:Amex uses four digits test CVV

enter image description here注意:美国运通使用四位数测试 CVV