Ruby-PayPalPayPal的Ruby API
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
评论
SendCloud-RubySendCloud API 的 Ruby 客户端
这个是SendCloudAPI的Ruby客户端。用法配置Sendcloud.setup do |config| config.api_user = 'your api user' config.a
SendCloud-RubySendCloud API 的 Ruby 客户端
0
rtranslateGoogle翻译的Ruby API
这是Ruby语言对Google在线翻译服务的封装。示例代码:require"rtranslate"result=Translate.t("china",Language::ENGLISH,Langua
rtranslateGoogle翻译的Ruby API
0
rtranslateGoogle翻译的Ruby API
这是 Ruby 语言对Google在线翻译服务的封装。 示例代码: require "rtransl
rtranslateGoogle翻译的Ruby API
0
SendCloud-RubySendCloud API 的 Ruby 客户端
这个是 SendCloud API 的 Ruby 客户端。用法配置Sendcloud.setup d
SendCloud-RubySendCloud API 的 Ruby 客户端
0
virtualbox-COM低级 Ruby 绑定到 VirtualBox API
virtualbox-COM Ruby gem 是一个提供低级 Ruby 绑定到 VirtualBo
virtualbox-COM低级 Ruby 绑定到 VirtualBox API
0
virtualbox-COM低级 Ruby 绑定到 VirtualBox API
virtualbox-COMRubygem是一个提供低级Ruby绑定到VirtualBoxAPI的库,允许任何人在Ruby程序中控制VirtualBox。可创建、销毁、启动、停止、暂停和恢复虚拟机,可
virtualbox-COM低级 Ruby 绑定到 VirtualBox API
0
Ruby SPDYSPDY 协议的 Ruby 语言实现
RubySPDY是SPDY协议的Ruby语言实现。示例代码:sr=SPDY::Protocol::Control::SynReply.newheaders={'Content-Type'=>'t
Ruby SPDYSPDY 协议的 Ruby 语言实现
0
Ruby Development ToolEclipse 的 Ruby 开发插件
Ruby Development Tools(RDT),这个插件使 Eclipse 能够成为一流的
Ruby Development ToolEclipse 的 Ruby 开发插件
0