如何使用Golang接受支付?

huangapple go评论84阅读模式
英文:

How to accept payments with golang?

问题

我正在使用Golang为我的应用程序制作后端,该应用程序适用于Android、iOS和Windows,我正在尝试找到一种接受支付的方法。是否有一个带有示例的包可以使用?

英文:

I'm making a back-end for my app using Golang the app is for android,ios and windows and i'm trying to find a way to accept payments.
Is there a package that I can use with examples?

答案1

得分: 8

我建议选择一个首选的支付系统,然后使用与该支付系统的REST API进行交互的Go客户端库。

以下是一些支付库:https://golanglibs.com/top?q=payment
其中大多数都包含示例文件或在自述文件中提供示例。许多Go软件包还使用GoDoc进行文档编写。

列表中最受欢迎的是PayPal-Go-SDK,它是用于PayPal REST API的Go客户端。
它包含一个示例文件:https://github.com/logpacker/PayPal-Go-SDK/blob/master/example_test.go

它还有GoDoc文档:https://godoc.org/github.com/logpacker/PayPal-Go-SDK

如果你更喜欢使用其他支付服务,比如Stripe,他们也有类似的客户端:https://github.com/stripe/stripe-go

他们也提供使用示例:https://github.com/stripe/stripe-go#usage

他们也有文档:https://godoc.org/github.com/stripe/stripe-go

英文:

Like some of the comments have mentioned, I also suggest choosing a preferred payment system and then using a Go client library which interfaces with that payment system's REST API.

Here are a few payment libraries: https://golanglibs.com/top?q=payment
Most of these include example files or examples in the readme. Many Go packages also use GoDoc for documentation.

The most popular one on the list there is PayPal-Go-SDK which is a Go client for the PayPal REST API.
It includes an example file: https://github.com/logpacker/PayPal-Go-SDK/blob/master/example_test.go

It has GoDoc documentation: https://godoc.org/github.com/logpacker/PayPal-Go-SDK

If you prefer to use a different payment service like Stripe, they have a similar client: https://github.com/stripe/stripe-go

They also have usage examples: https://github.com/stripe/stripe-go#usage

They also have documentation: https://godoc.org/github.com/stripe/stripe-go

huangapple
  • 本文由 发表于 2017年3月19日 01:29:33
  • 转载请务必保留本文链接:https://go.coder-hub.com/42877566.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定