tc/paypal_adaptive — Issue #28: PaypalAdaptive is broken under Ruby 1.9.3
Author: deepj
Created: 2011-11-23 18:55:06+00:00
State: open

```
citadela:paypal_adaptive deepj$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0]

citadela:paypal_adaptive deepj$ rake test
Run options:

# Running tests:

...-------
get shipping addresses
E........EEE...-------
chain
E-------
parallel
E-------
simple
E-------
payment details
E-------
set payment options
E-------
invalid
E-------
invalid
E-------
valid test
{"returnUrl"=>"http://127.0.0.1:3000/payments/completed_payment_request", "requestEnvelope"=>{"errorLanguage"=>"en_US"}, "currencyCode"=>"USD", "cancelUrl"=>"http://127.0.0.1:3000/payments/canceled_payment_request", "maxTotalAmountOfAllPayments"=>"1500.00", "maxNumberOfPayments"=>"30", "startingDate"=>"2020-07-13T07:00:00.000Z", "endingDate"=>"2020-12-13T07:00:00.000Z"}
E

Finished tests in 14.331456s, 1.8142 tests/s, 0.5582 assertions/s.

1) Error:
test_get_shipping_addresses(GetShippingAddressesTest):
TypeError: can't convert nil into String
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:90:in `post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:75:in `wrap_post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:29:in `pay'
/Users/deepj/dev/oss/paypal_adaptive/test/unit/get_shipping_addresses_test.rb:19:in `test_get_shipping_addresses'

2) Error:
test_invalid_chain_pay(PayRequestTest):
TypeError: can't convert nil into String
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:90:in `post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:75:in `wrap_post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:29:in `pay'
/Users/deepj/dev/oss/paypal_adaptive/test/unit/pay_request_test.rb:50:in `test_invalid_chain_pay'

3) Error:
test_invalid_parallel_pay(PayRequestTest):
TypeError: can't convert nil into String
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:90:in `post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:75:in `wrap_post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:29:in `pay'
/Users/deepj/dev/oss/paypal_adaptive/test/unit/pay_request_test.rb:71:in `test_invalid_parallel_pay'

4) Error:
test_invalid_simple_pay(PayRequestTest):
TypeError: can't convert nil into String
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:90:in `post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:75:in `wrap_post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:29:in `pay'
/Users/deepj/dev/oss/paypal_adaptive/test/unit/pay_request_test.rb:25:in `test_invalid_simple_pay'

5) Error:
test_valid_chain_pay(PayRequestTest):
TypeError: can't convert nil into String
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:90:in `post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:75:in `wrap_post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:29:in `pay'
/Users/deepj/dev/oss/paypal_adaptive/test/unit/pay_request_test.rb:36:in `test_valid_chain_pay'

6) Error:
test_valid_parallel_pay(PayRequestTest):
TypeError: can't convert nil into String
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:90:in `post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:75:in `wrap_post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:29:in `pay'
/Users/deepj/dev/oss/paypal_adaptive/test/unit/pay_request_test.rb:62:in `test_valid_parallel_pay'

7) Error:
test_valid_simple_pay(PayRequestTest):
TypeError: can't convert nil into String
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:90:in `post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:75:in `wrap_post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:29:in `pay'
/Users/deepj/dev/oss/paypal_adaptive/test/unit/pay_request_test.rb:15:in `test_valid_simple_pay'

8) Error:
test_payment_details(PaymentDetailsTest):
TypeError: can't convert nil into String
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:90:in `post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:75:in `wrap_post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:29:in `pay'
/Users/deepj/dev/oss/paypal_adaptive/test/unit/payment_details_test.rb:18:in `test_payment_details'

9) Error:
test_payment_options(PaymentOptionsTest):
TypeError: can't convert nil into String
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:90:in `post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:75:in `wrap_post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:29:in `pay'
/Users/deepj/dev/oss/paypal_adaptive/test/unit/payment_options_test.rb:19:in `test_payment_options'

10) Error:
test_invalid_preapproval(PreapprovalTest):
TypeError: can't convert nil into String
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:90:in `post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:75:in `wrap_post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:49:in `preapproval'
/Users/deepj/dev/oss/paypal_adaptive/test/unit/preapproval_test.rb:31:in `test_invalid_preapproval'

11) Error:
test_invalid_preapproval_with_bad_credit_information(PreapprovalTest):
TypeError: can't convert nil into String
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:90:in `post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:75:in `wrap_post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:49:in `preapproval'
/Users/deepj/dev/oss/paypal_adaptive/test/unit/preapproval_test.rb:45:in `test_invalid_preapproval_with_bad_credit_information'

12) Error:
test_preapproval(PreapprovalTest):
TypeError: can't convert nil into String
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:90:in `post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:75:in `wrap_post'
/Users/deepj/dev/oss/paypal_adaptive/lib/paypal_adaptive/request.rb:49:in `preapproval'
/Users/deepj/dev/oss/paypal_adaptive/test/unit/preapproval_test.rb:16:in `test_preapproval'

26 tests, 8 assertions, 0 failures, 12 errors, 0 skips
rake aborted!
Command failed with status (12): [/Users/deepj/.rvm/rubies/ruby-1.9.3-p0/bin...]

Tasks: TOP => test => test:units
(See full trace by running task with --trace)
```

In my test `PaypalAdaptive::Request.pay` returns the same error.