适用于任何支付网关的购物车 API?(至少需要PayPal) [英] Shopping Cart API for any payment gateway? (PayPal at least required)

查看:29
本文介绍了适用于任何支付网关的购物车 API?(至少需要PayPal)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试找到一个基于 Java 的 API,它至少包含处理信用卡交易或通过 PayPal 购买的细节,以及其他网关作为 IPN 方式的加分项(即不需要产品,只需一个发票金额)

I'm trying to find a java based API that wraps up the details of processing a credit card transaction or purchase via PayPal at a minimum, and other gateways as a plus in an IPN fashion (ie no products required, just an invoice amount)

稍微简化一下,我想我应该能够做类似以下伪代码的事情:

As a bit of a simplification, I think I should be able to do something like the following pseudocode:

shoppingApi.postTransaction("paypal", amount, currency, invoiceId, purchaseDescription)

以及稍后在计划任务期间或来自 IPN 网址的通知:

and later on during a scheduled task or on notification from an IPN url:

completedPayments = shoppingApi.getUnprocessedCompletedPayments();
for (Payment payment: completedPayments)
{
  // my code to process a successful payment.
}

然后我会处理购买.

我知道有大量的购物车可以这样做,但据我所知,他们都希望您将您的产品放入他们的系统中,这对我不起作用.我的产品在第 3 方系统中,我只想处理付款.仅此而已.

I know there's tons of shopping carts out there that do this, but from what I've seen, they all want you to put your products in their system, which doesn't work for me. My products are in a 3rd party system, and I just want to process a payment. That's all.

我所知道的任何购物车都没有像我上面建议的那样公开一个简单的 API.我不在乎我的用户使用什么支付类型,我只想知道他们是否完成了它.我知道 Shopify.com 有一个 REST api 可以做这样的事情,但它不像 IPN(它希望你的产品在它的系统中).

And no cart I know of exposes a simple API like the one I'm suggesting above. I don't care what payment type my users use, I just want to know if they completed it. I know that Shopify.com has a REST api that does something like this, but it's not IPN like (it wants your products in it's system).

预先感谢您的任何建议!

Thanks in advance for any suggestions!

我当然知道我需要查看其他状态,例如待处理"等,但这只是另一个简单的 API 调用,比如shoppingApi.getPendingPayments().如果 API 执行了上述 2 个调用,我会很高兴 ;-)

I know of course that there'd be other statuses that I'd need to look at, like "pending", etc, but that'd simply be another simple API call, like shoppingApi.getPendingPayments(). If the API did the above 2 calls, I'd be pretty happy ;-)

编辑 2:我更喜欢开源,但如果它是固定费用,可以在一定程度上试用,并且相当成熟/受人尊敬,我完全对商业开放

EDIT 2: I'd prefer opensource, but am totally open to commercial if it's a flat fee, can be trialed to some extent, and is reasonably mature/respectable

编辑 3 - 主要注意事项:我相信应该存在这样的库.能不能做是另一个问题.所以要清楚,我真的很想看到是的,使用这个库"的答案,而不是不",这是不可能的,因为我 %99.999 确定它可以做到 ;-) 提前致谢!

EDIT 3 - MAJOR NOTE: I feel confident that such a library should exist. Whether or not it does is another question. So to be clear, I'd really like to see "yes, use this library" answers, not "NO", this can't be done, as I'm %99.999 sure it can be done ;-) Thanks in advance!

推荐答案

这个网站可能是通过 jruby 使用.
这可能会也可能不会接近满足您的要求.

There's this site which could be used via jruby.
This may or may not come somewhere near meeting your requirements.

这篇关于适用于任何支付网关的购物车 API?(至少需要PayPal)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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