lib/alipay/service.rb in alipay-0.15.0 vs lib/alipay/service.rb in alipay-0.15.1
- old
+ new
@@ -8,12 +8,12 @@
check_required_params(params, CREATE_PARTNER_TRADE_BY_BUYER_REQUIRED_PARAMS)
params = {
'service' => 'create_partner_trade_by_buyer',
'_input_charset' => 'utf-8',
- 'partner' => options[:pid] || Alipay.pid,
- 'seller_id' => options[:pid] || Alipay.pid,
+ 'partner' => options[:partner] || options[:pid] || Alipay.pid,
+ 'seller_id' => options[:seller_id] || options[:pid] || Alipay.pid,
'payment_type' => '1'
}.merge(params)
request_uri(params, options).to_s
end
@@ -24,12 +24,12 @@
check_required_params(params, TRADE_CREATE_BY_BUYER_REQUIRED_PARAMS)
params = {
'service' => 'trade_create_by_buyer',
'_input_charset' => 'utf-8',
- 'partner' => options[:pid] || Alipay.pid,
- 'seller_id' => options[:pid] || Alipay.pid,
+ 'partner' => options[:partner] || options[:pid] || Alipay.pid,
+ 'seller_id' => options[:seller_id] || options[:pid] || Alipay.pid,
'payment_type' => '1'
}.merge(params)
request_uri(params, options).to_s
end
@@ -44,12 +44,12 @@
end
params = {
'service' => 'create_direct_pay_by_user',
'_input_charset' => 'utf-8',
- 'partner' => options[:pid] || Alipay.pid,
- 'seller_id' => options[:pid] || Alipay.pid,
+ 'partner' => options[:partner] || options[:pid] || Alipay.pid,
+ 'seller_id' => options[:seller_id] || options[:pid] || Alipay.pid,
'payment_type' => '1'
}.merge(params)
request_uri(params, options).to_s
end
@@ -60,12 +60,12 @@
check_required_params(params, CREATE_DIRECT_PAY_BY_USER_WAP_REQUIRED_PARAMS)
params = {
'service' => 'alipay.wap.create.direct.pay.by.user',
'_input_charset' => 'utf-8',
- 'partner' => options[:pid] || Alipay.pid,
- 'seller_id' => options[:pid] || Alipay.pid,
+ 'partner' => options[:partner] || options[:pid] || Alipay.pid,
+ 'seller_id' => options[:seller_id] || options[:pid] || Alipay.pid,
'payment_type' => '1'
}.merge(params)
request_uri(params, options).to_s
end
@@ -200,11 +200,11 @@
check_required_params(params, CREATE_FOREX_TRADE_WAP_REQUIRED_PARAMS)
params = {
'service' => 'create_forex_trade_wap',
'_input_charset' => 'utf-8',
- 'partner' => options[:pid] || Alipay.pid,
- 'seller_id' => options[:pid] || Alipay.pid
+ 'partner' => options[:partner] || options[:pid] || Alipay.pid,
+ 'seller_id' => options[:seller_id] || options[:pid] || Alipay.pid,
}.merge(params)
request_uri(params, options).to_s
end