如何将MoneyBookers集成到PHP的Web应用程序中? [英] How to integrate MoneyBookers in Web application in PHP?

查看:109
本文介绍了如何将MoneyBookers集成到PHP的Web应用程序中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个PHP网站,并且需要将MONEYBOOKERs集成为支付网关.

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

在将MoneyBookers网关嵌入到我的网站时需要帮助.当我使用测试链接(沙盒URL)时,该链接为:

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

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

我面临的问题是,MONEYBOOKERs在测试时没有显示任何交易内容.

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

请帮助!

推荐答案

我在我最近的博客文章中详细介绍了此主题:

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:

  1. 注册Moneybookers测试帐户
  2. 创建一个秘密单词"
  3. 创建您自己的付款表格(在Moneybookers结帐页面上带有徽标)
  4. 验证Moneybookers订单

我不会在这里介绍所有步骤,因为如果我回答了,那么它将占用几页.但是,我将介绍第四个主题(验证Moneybookers的订单),因为当前此页面上的答案充满了问题(SQL注入等).如果您需要每个步骤的详细说明,请 阅读我的文章 .

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.

我将对此进行更详细的介绍

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:


<form action="https://www.moneybookers.com/app/payment.pl" method="post">
  <input type="hidden" name="pay_to_email" value="merchant-email@example.com"/>
  <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>

验证Moneybookers订单

用户为您的软件,电子书或其他数字内容付款后,您将需要自动验证订单并将其订购的商品发送到其电子邮件地址.在此示例中,我提到了 使用LimeLM创建产品密钥 ,但是您确实可以做到任何东西.

Verifying the Moneybookers order

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.

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

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


<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 = 'merchant-email@example.com';

// 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;
}

如果您不知道如何在Moneybookers中设置密码,我会在"

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.

如果您不希望自己编写此代码,那么我们为 LimeLM提供了完整的付款表格 客户.它是为PHP,C#和VB.NET编写的,并且对我们所有客户(甚至我们的自由用户)都是免费的.因此,您可以下载它,将其集成到您的网站中,然后使用它,而无需支付我们任何费用.

If you're not keen on writing this code yourself then we have a fully built payment form for our LimeLM customers. 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.

付款选择页面看起来像:

这篇关于如何将MoneyBookers集成到PHP的Web应用程序中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆