PayPal的Ruby API Ruby-PayPal

码农软件 · 软件分类 · 其他开发相关 · 2019-10-30 13:44:11

软件介绍

Ruby-PayPal 是 PayPal API 的 Ruby 语言封装版本。

安装方法:gem install ruby-paypal

示例代码:

username = <PayPal API username>
password = <PayPal API password>
signature = <PayPal API signature>

ipaddress = '192.168.1.1' # can be any IP address
amount = '100.00' # amount paid
card_type = 'VISA' # can be Visa, Mastercard, Amex etc
card_no = '4512345678901234' # credit card number
exp_date = '022010' # expiry date of the credit card
first_name = 'Sau Sheong'
last_name = 'Chang'

paypal = Paypal.new(username, password, signature) # uses the PayPal sandbox
response = paypal.do_direct_payment_sale(ipaddress, amount, card_type,
card_no, exp_date, first_name, last_name)
if response.ack == 'Success' then
# do your thing
end

本文地址:https://codercto.com/soft/d/17891.html

算法新解

算法新解

刘新宇 / 人民邮电出版社 / 2016-12-1 / CNY 99.00

本书分4 部分,同时用函数式和传统方法介绍主要的基本算法和数据结构。数据结构部分包括二叉树、红黑树、AVL 树、Trie、Patricia、后缀树、B 树、二叉堆、二项式堆、斐波那契堆、配对堆、队列、序列等;基本算法部分包括各种排序算法、序列搜索算法、字符串匹配算法(KMP 等)、深度优先与广度优先搜索算法、贪心算法以及动态规划。 本书适合软件开发人员、编程和算法爱好者,以及高校学生阅读参考......一起来看看 《算法新解》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

html转js在线工具
html转js在线工具

html转js在线工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具