- 授权协议: SDK
- 开发语言: Ruby
- 操作系统: 跨平台
- 软件首页: https://github.com/paypal/adaptivepayments-sdk-ruby
软件介绍
Adaptivepayments-sdk-ruby(又称 PayPal Adaptive Payments SDK)正如名字所形容的那样,这是一个 RUBY 编写的自适应支付 SDK(Adaptive Payment SDK )。
PayPal Adaptive Payments SDK 提供了 Ruby APIs 来创建、处理和管理简单和复杂(parallel and chained)支付方式,并且使用 Adaptive Payments API 实现预批准申请。
代码示例:
require 'paypal-sdk-adaptivepayments'
PayPal::SDK.configure(
:mode => "sandbox", # Set "live" for production
:app_id => "APP-80W284485P519543T",
:username => "jb-us-seller_api1.paypal.com",
:password => "WX4WTU3S8MY44S7F",
:signature => "AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy" )
@api = PayPal::SDK::AdaptivePayments.new
# Build request object
@pay = @api.build_pay({
:actionType => "PAY",
:cancelUrl => "http://localhost:3000/samples/adaptive_payments/pay",
:currencyCode => "USD",
:feesPayer => "SENDER",
:ipnNotificationUrl => "http://localhost:3000/samples/adaptive_payments/ipn_notify",
:receiverList => {
:receiver => [{
:amount => 1.0,
:email => "platfo_1255612361_per@gmail.com" }] },
:returnUrl => "http://localhost:3000/samples/adaptive_payments/pay" })
# Make API call & get response
@response = @api.pay(@pay)
# Access response
if @response.success? && @response.payment_exec_status != "ERROR"
@response.payKey
@api.payment_url(@response) # Url to complete payment
else
@response.error[0].message
endProfessional JavaScript for Web Developers
Nicholas C. Zakas / Wrox / 2009-1-14 / USD 49.99
This eagerly anticipated update to the breakout book on JavaScript offers you an in-depth look at the numerous advances to the techniques and technology of the JavaScript language. You'll see why Java......一起来看看 《Professional JavaScript for Web Developers》 这本书的介绍吧!
