didil-paypal-recurring 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/.rspec +1 -0
  4. data/Gemfile +2 -0
  5. data/Gemfile.lock +46 -0
  6. data/README.rdoc +144 -0
  7. data/Rakefile +5 -0
  8. data/docs/PP_NVPAPI_DeveloperGuide.pdf +0 -0
  9. data/docs/PP_WPP_IntegrationGuide.pdf +0 -0
  10. data/lib/paypal-recurring.rb +1 -0
  11. data/lib/paypal/recurring.rb +110 -0
  12. data/lib/paypal/recurring/base.rb +286 -0
  13. data/lib/paypal/recurring/cacert.pem +3987 -0
  14. data/lib/paypal/recurring/notification.rb +84 -0
  15. data/lib/paypal/recurring/request.rb +211 -0
  16. data/lib/paypal/recurring/response.rb +29 -0
  17. data/lib/paypal/recurring/response/base.rb +62 -0
  18. data/lib/paypal/recurring/response/checkout.rb +11 -0
  19. data/lib/paypal/recurring/response/details.rb +26 -0
  20. data/lib/paypal/recurring/response/manage_profile.rb +12 -0
  21. data/lib/paypal/recurring/response/payment.rb +24 -0
  22. data/lib/paypal/recurring/response/profile.rb +71 -0
  23. data/lib/paypal/recurring/response/refund.rb +23 -0
  24. data/lib/paypal/recurring/utils.rb +26 -0
  25. data/lib/paypal/recurring/version.rb +10 -0
  26. data/paypal-recurring.gemspec +27 -0
  27. data/spec/fixtures/checkout/failure.yml +38 -0
  28. data/spec/fixtures/checkout/success.yml +38 -0
  29. data/spec/fixtures/create_profile/failure.yml +38 -0
  30. data/spec/fixtures/create_profile/success.yml +38 -0
  31. data/spec/fixtures/details/cancelled.yml +38 -0
  32. data/spec/fixtures/details/failure.yml +38 -0
  33. data/spec/fixtures/details/success.yml +38 -0
  34. data/spec/fixtures/ipn/express_checkout.json +35 -0
  35. data/spec/fixtures/ipn/recurring_payment.json +44 -0
  36. data/spec/fixtures/ipn/recurring_payment_profile_created.json +31 -0
  37. data/spec/fixtures/ipn/recurring_payment_profile_created_with_initial_amount.json +33 -0
  38. data/spec/fixtures/ipn/recurring_payment_skipped.json +30 -0
  39. data/spec/fixtures/ipn/recurring_payment_with_initial_amount.json +44 -0
  40. data/spec/fixtures/notification/failure.yml +50 -0
  41. data/spec/fixtures/notification/success.yml +50 -0
  42. data/spec/fixtures/payment/failure.yml +38 -0
  43. data/spec/fixtures/payment/success.yml +38 -0
  44. data/spec/fixtures/profile/cancel/failure.yml +38 -0
  45. data/spec/fixtures/profile/cancel/success.yml +38 -0
  46. data/spec/fixtures/profile/failure.yml +38 -0
  47. data/spec/fixtures/profile/reactivate/failure.yml +38 -0
  48. data/spec/fixtures/profile/reactivate/success.yml +38 -0
  49. data/spec/fixtures/profile/success.yml +38 -0
  50. data/spec/fixtures/profile/suspend/failure.yml +38 -0
  51. data/spec/fixtures/profile/suspend/success.yml +38 -0
  52. data/spec/fixtures/refund/failure.yml +38 -0
  53. data/spec/fixtures/refund/success.yml +38 -0
  54. data/spec/fixtures/update_profile/failure.yml +38 -0
  55. data/spec/fixtures/update_profile/profile.yml +38 -0
  56. data/spec/fixtures/update_profile/success.yml +38 -0
  57. data/spec/paypal/notification_spec.rb +106 -0
  58. data/spec/paypal/recurring_spec.rb +81 -0
  59. data/spec/paypal/request_spec.rb +136 -0
  60. data/spec/paypal/response/base_spec.rb +19 -0
  61. data/spec/paypal/response/checkout_details_spec.rb +50 -0
  62. data/spec/paypal/response/checkout_spec.rb +32 -0
  63. data/spec/paypal/response/create_recurring_profile_spec.rb +41 -0
  64. data/spec/paypal/response/manage_profile_spec.rb +62 -0
  65. data/spec/paypal/response/profile_spec.rb +43 -0
  66. data/spec/paypal/response/refund_spec.rb +33 -0
  67. data/spec/paypal/response/request_payment_spec.rb +35 -0
  68. data/spec/paypal/response/update_recurring_profile_spec.rb +48 -0
  69. data/spec/spec_helper.rb +27 -0
  70. metadata +209 -0
@@ -0,0 +1,71 @@
1
+ module PayPal
2
+ module Recurring
3
+ module Response
4
+ class Profile < Base
5
+ mapping(
6
+ :profile_id => :PROFILEID,
7
+ :status => :STATUS,
8
+ :description => :DESC,
9
+ :outstanding => :AUTOBILLOUTAMT,
10
+ :failed => :MAXFAILEDPAYMENTS,
11
+ :payer_name => :SUBSCRIBERNAME,
12
+ :start_at => :PROFILESTARTDATE,
13
+ :reference => :PROFILEREFERENCE,
14
+ :completed => :NUMCYCLESCOMPLETED,
15
+ :remaining => :NUMCYCLESREMAINING,
16
+ :outstanding_balance => :OUTSTANDINGBALANCE,
17
+ :failed_count => :FAILEDPAYMENTCOUNT,
18
+ :last_payment_date => :LASTPAYMENTDATE,
19
+ :last_payment_amount => :LASTPAYMENTAMT,
20
+ :period => :BILLINGPERIOD,
21
+ :frequency => :BILLINGFREQUENCY,
22
+ :currency => :CURRENCYCODE,
23
+ :amount => :AMT,
24
+ :initial_amount => :AGGREGATEOPTIONALAMT
25
+ )
26
+
27
+ OUTSTANDING = {
28
+ "AddToNextBilling" => :next_billing,
29
+ "NoAutoBill" => :no_auto
30
+ }
31
+
32
+ STATUS = {
33
+ "Cancelled" => :canceled,
34
+ "Active" => :active,
35
+ "Suspended" => :suspended
36
+ }
37
+
38
+ PERIOD = {
39
+ "Month" => :monthly,
40
+ "Weekly" => :weekly,
41
+ "Year" => :yearly,
42
+ "Day" => :daily
43
+ }
44
+
45
+ def active?
46
+ status == :active
47
+ end
48
+
49
+ private
50
+ def build_outstanding(value)
51
+ OUTSTANDING.fetch(value, value)
52
+ end
53
+
54
+ def build_status(value)
55
+ STATUS.fetch(value, value)
56
+ end
57
+
58
+ def build_date(string)
59
+ Time.parse(string)
60
+ end
61
+
62
+ def build_period(value)
63
+ PERIOD.fetch(value, value)
64
+ end
65
+
66
+ alias_method :build_start_at, :build_date
67
+ alias_method :build_last_payment_date, :build_date
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,23 @@
1
+ module PayPal
2
+ module Recurring
3
+ module Response
4
+ class Refund < Base
5
+ mapping(
6
+ :transaction_id => :REFUNDTRANSACTIONID,
7
+ :fee_amount => :FEEREFUNDAMT,
8
+ :gross_amount => :GROSSREFUNDAMT,
9
+ :net_amount => :NETREFUNDAMT,
10
+ :amount => :TOTALREFUNDEDAMOUNT,
11
+ :currency => :CURRENCYCODE,
12
+ :info => :REFUNDINFO,
13
+ :status => :REFUNDSTATUS,
14
+ :pending_reason => :PENDINGREASON
15
+ )
16
+
17
+ def completed?
18
+ params[:REFUNDSTATUS] == "instant"
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,26 @@
1
+ module PayPal
2
+ module Recurring
3
+ module Utils
4
+ def convert_to_time(string)
5
+ DateTime.strptime(string, "%H:%M:%S %b %e, %Y %Z").new_offset(0)
6
+ end
7
+
8
+ def mapping(options = {})
9
+ options.each do |to, from|
10
+ class_eval <<-RUBY
11
+ def #{to}
12
+ @#{to} ||= begin
13
+ from = [#{from.inspect}].flatten
14
+ name = from.find {|name| params[name]}
15
+ value = nil
16
+ value = params[name] if name
17
+ value = send("build_#{to}", value) if respond_to?("build_#{to}", true)
18
+ value
19
+ end
20
+ end
21
+ RUBY
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,10 @@
1
+ module PayPal
2
+ module Recurring
3
+ module Version
4
+ MAJOR = 1
5
+ MINOR = 1
6
+ PATCH = 1
7
+ STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,27 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "paypal-recurring"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "didil-paypal-recurring"
7
+ s.version = PayPal::Recurring::Version::STRING
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Nando Vieira"]
10
+ s.email = ["fnando.vieira@gmail.com"]
11
+ s.homepage = "http://rubygems.org/gems/paypal-recurring"
12
+ s.summary = "PayPal Express Checkout API Client for recurring billing."
13
+ s.description = s.summary
14
+
15
+ s.files = `git ls-files`.split("\n")
16
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
+ s.require_paths = ["lib"]
19
+
20
+ s.add_development_dependency "rspec"
21
+ s.add_development_dependency "rake"
22
+ s.add_development_dependency "vcr"
23
+ s.add_development_dependency "fakeweb"
24
+ s.add_development_dependency "pry"
25
+ s.add_development_dependency "awesome_print"
26
+ s.add_development_dependency "activesupport"
27
+ end
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api-3t.sandbox.paypal.com/nvp
6
+ body:
7
+ encoding: US-ASCII
8
+ string: USER=seller_1308793919_biz_api1.simplesideias.com.br&PWD=1308793931&SIGNATURE=AFcWxV21C7fd0v3bYYYRCpSSRl31AzaB6TzXx5amObyEghjU13.0av2Y&VERSION=72.0&PAYMENTREQUEST_0_PAYMENTACTION=Authorization&NOSHIPPING=1&L_BILLINGTYPE0=RecurringPayments&METHOD=SetExpressCheckout
9
+ headers:
10
+ accept:
11
+ - ! '*/*'
12
+ user-agent:
13
+ - PayPal::Recurring/0.1.8
14
+ content-type:
15
+ - application/x-www-form-urlencoded
16
+ connection:
17
+ - close
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ date:
24
+ - Mon, 23 Apr 2012 03:04:47 GMT
25
+ server:
26
+ - Apache
27
+ content-length:
28
+ - '779'
29
+ connection:
30
+ - close
31
+ content-type:
32
+ - text/plain; charset=utf-8
33
+ body:
34
+ encoding: US-ASCII
35
+ string: TIMESTAMP=2012%2d04%2d23T03%3a04%3a48Z&CORRELATIONID=367f117161d20&ACK=Failure&VERSION=72%2e0&BUILD=2808426&L_ERRORCODE0=10478&L_ERRORCODE1=10404&L_ERRORCODE2=10405&L_SHORTMESSAGE0=Invalid%20Data&L_SHORTMESSAGE1=Transaction%20refused%20because%20of%20an%20invalid%20argument%2e%20See%20additional%20error%20messages%20for%20details%2e&L_SHORTMESSAGE2=Transaction%20refused%20because%20of%20an%20invalid%20argument%2e%20See%20additional%20error%20messages%20for%20details%2e&L_LONGMESSAGE0=Recurring%20payments%20profile%20description%20must%20be%20provided%20if%20the%20billing%20agreement%20type%20is%20recurring%20payments%2e&L_LONGMESSAGE1=ReturnURL%20is%20missing%2e&L_LONGMESSAGE2=CancelURL%20is%20missing%2e&L_SEVERITYCODE0=Error&L_SEVERITYCODE1=Error&L_SEVERITYCODE2=Error
36
+ http_version: '1.1'
37
+ recorded_at: Mon, 23 Apr 2012 03:04:49 GMT
38
+ recorded_with: VCR 2.1.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api-3t.sandbox.paypal.com/nvp
6
+ body:
7
+ encoding: US-ASCII
8
+ string: USER=seller_1308793919_biz_api1.simplesideias.com.br&PWD=1308793931&SIGNATURE=AFcWxV21C7fd0v3bYYYRCpSSRl31AzaB6TzXx5amObyEghjU13.0av2Y&VERSION=72.0&PAYMENTREQUEST_0_AMT=9.00&AMT=9.00&RETURNURL=http%3A%2F%2Fexample.com%2Fthank_you&CANCELURL=http%3A%2F%2Fexample.com%2Fcanceled&PAYMENTREQUEST_0_CURRENCYCODE=USD&CURRENCYCODE=USD&DESC=Awesome+-+Monthly+Subscription&PAYMENTREQUEST_0_DESC=Awesome+-+Monthly+Subscription&L_BILLINGAGREEMENTDESCRIPTION0=Awesome+-+Monthly+Subscription&PAYMENTREQUEST_0_NOTIFYURL=http%3A%2F%2Fexample.com%2Fpaypal%2Fipn&NOTIFYURL=http%3A%2F%2Fexample.com%2Fpaypal%2Fipn&PAYMENTREQUEST_0_PAYMENTACTION=Authorization&NOSHIPPING=1&L_BILLINGTYPE0=RecurringPayments&METHOD=SetExpressCheckout
9
+ headers:
10
+ accept:
11
+ - ! '*/*'
12
+ user-agent:
13
+ - PayPal::Recurring/0.1.8
14
+ content-type:
15
+ - application/x-www-form-urlencoded
16
+ connection:
17
+ - close
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ date:
24
+ - Mon, 23 Apr 2012 03:04:44 GMT
25
+ server:
26
+ - Apache
27
+ content-length:
28
+ - '136'
29
+ connection:
30
+ - close
31
+ content-type:
32
+ - text/plain; charset=utf-8
33
+ body:
34
+ encoding: US-ASCII
35
+ string: TOKEN=EC%2d6K296451S2213041J&TIMESTAMP=2012%2d04%2d23T03%3a04%3a44Z&CORRELATIONID=f5242d7256b62&ACK=Success&VERSION=72%2e0&BUILD=2808426
36
+ http_version: '1.1'
37
+ recorded_at: Mon, 23 Apr 2012 03:04:45 GMT
38
+ recorded_with: VCR 2.1.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api-3t.sandbox.paypal.com/nvp
6
+ body:
7
+ encoding: US-ASCII
8
+ string: USER=fnando.vieira%2Bseller_api1.gmail.com&PWD=PRTZZX6JDACB95SA&SIGNATURE=AJnjtLN0ozBP-BF2ZJrj5sfbmGAxAnf5tev1-MgK5Z8IASmtj-Fw.5pt&VERSION=72.0&METHOD=CreateRecurringPaymentsProfile
9
+ headers:
10
+ accept:
11
+ - ! '*/*'
12
+ user-agent:
13
+ - PayPal::Recurring/0.1.8
14
+ content-type:
15
+ - application/x-www-form-urlencoded
16
+ connection:
17
+ - close
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ date:
24
+ - Mon, 23 Apr 2012 03:57:47 GMT
25
+ server:
26
+ - Apache
27
+ content-length:
28
+ - '933'
29
+ connection:
30
+ - close
31
+ content-type:
32
+ - text/plain; charset=utf-8
33
+ body:
34
+ encoding: US-ASCII
35
+ string: TIMESTAMP=2012%2d04%2d23T03%3a57%3a48Z&CORRELATIONID=5bb3a49b407e3&ACK=Failure&VERSION=72%2e0&BUILD=2764190&L_ERRORCODE0=11585&L_ERRORCODE1=11518&L_ERRORCODE2=11516&L_ERRORCODE3=11519&L_ERRORCODE4=11549&L_SHORTMESSAGE0=Missing%20Token%20or%20payment%20source&L_SHORTMESSAGE1=Invalid%20billing%20period%2e&L_SHORTMESSAGE2=Invalid%20billing%20frequency&L_SHORTMESSAGE3=Invalid%20amount&L_SHORTMESSAGE4=Start%20Date%20is%20required&L_LONGMESSAGE0=Missing%20Token%20or%20buyer%20credit%20card&L_LONGMESSAGE1=Billing%20period%20must%20be%20one%20of%20Day%2c%20Week%2c%20SemiMonth%2c%20or%20Year&L_LONGMESSAGE2=Billing%20frequency%20must%20be%20%3e%200%20and%20be%20less%20than%20or%20equal%20to%20one%20year&L_LONGMESSAGE3=Bill%20amount%20must%20be%20greater%20than%200&L_LONGMESSAGE4=Subscription%20start%20date%20is%20required&L_SEVERITYCODE0=Error&L_SEVERITYCODE1=Error&L_SEVERITYCODE2=Error&L_SEVERITYCODE3=Error&L_SEVERITYCODE4=Error
36
+ http_version: '1.1'
37
+ recorded_at: Mon, 23 Apr 2012 03:57:48 GMT
38
+ recorded_with: VCR 2.1.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api-3t.sandbox.paypal.com/nvp
6
+ body:
7
+ encoding: US-ASCII
8
+ string: USER=fnando.vieira%2Bseller_api1.gmail.com&PWD=PRTZZX6JDACB95SA&SIGNATURE=AJnjtLN0ozBP-BF2ZJrj5sfbmGAxAnf5tev1-MgK5Z8IASmtj-Fw.5pt&VERSION=72.0&PAYMENTREQUEST_0_AMT=9.00&AMT=9.00&INITAMT=9.00&FAILEDINITAMTACTION=CancelOnFailure&PAYMENTREQUEST_0_CURRENCYCODE=BRL&CURRENCYCODE=BRL&DESC=Awesome+-+Monthly+Subscription&PAYMENTREQUEST_0_DESC=Awesome+-+Monthly+Subscription&L_BILLINGAGREEMENTDESCRIPTION0=Awesome+-+Monthly+Subscription&PAYERID=D2U7M6PTMJBML&TOKEN=EC-47J551124P900104V&PROFILEREFERENCE=1234&PAYMENTREQUEST_0_CUSTOM=1234&PAYMENTREQUEST_0_INVNUM=1234&PROFILESTARTDATE=2012-04-23T00%3A57%3A38Z&MAXFAILEDPAYMENTS=1&AUTOBILLOUTAMT=AddToNextBilling&PAYMENTREQUEST_0_NOTIFYURL=http%3A%2F%2Fexample.com%2Fpaypal%2Fipn&NOTIFYURL=http%3A%2F%2Fexample.com%2Fpaypal%2Fipn&BILLINGFREQUENCY=1&BILLINGPERIOD=Month&METHOD=CreateRecurringPaymentsProfile
9
+ headers:
10
+ accept:
11
+ - ! '*/*'
12
+ user-agent:
13
+ - PayPal::Recurring/0.1.8
14
+ content-type:
15
+ - application/x-www-form-urlencoded
16
+ connection:
17
+ - close
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ date:
24
+ - Mon, 23 Apr 2012 03:57:42 GMT
25
+ server:
26
+ - Apache
27
+ content-length:
28
+ - '162'
29
+ connection:
30
+ - close
31
+ content-type:
32
+ - text/plain; charset=utf-8
33
+ body:
34
+ encoding: US-ASCII
35
+ string: PROFILEID=I%2dW4FNTE6EXJ2W&PROFILESTATUS=ActiveProfile&TIMESTAMP=2012%2d04%2d23T03%3a57%3a44Z&CORRELATIONID=cf6f350f91d2&ACK=Success&VERSION=72%2e0&BUILD=2764190
36
+ http_version: '1.1'
37
+ recorded_at: Mon, 23 Apr 2012 03:57:44 GMT
38
+ recorded_with: VCR 2.1.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api-3t.sandbox.paypal.com/nvp
6
+ body:
7
+ encoding: US-ASCII
8
+ string: USER=fnando.vieira%2Bseller_api1.gmail.com&PWD=PRTZZX6JDACB95SA&SIGNATURE=AJnjtLN0ozBP-BF2ZJrj5sfbmGAxAnf5tev1-MgK5Z8IASmtj-Fw.5pt&VERSION=72.0&TOKEN=EC-8J298813NS092694P&METHOD=GetExpressCheckoutDetails
9
+ headers:
10
+ accept:
11
+ - ! '*/*'
12
+ user-agent:
13
+ - PayPal::Recurring/0.1.8
14
+ content-type:
15
+ - application/x-www-form-urlencoded
16
+ connection:
17
+ - close
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ date:
24
+ - Mon, 23 Apr 2012 03:55:18 GMT
25
+ server:
26
+ - Apache
27
+ content-length:
28
+ - '1013'
29
+ connection:
30
+ - close
31
+ content-type:
32
+ - text/plain; charset=utf-8
33
+ body:
34
+ encoding: US-ASCII
35
+ string: TOKEN=EC%2d8J298813NS092694P&BILLINGAGREEMENTACCEPTEDSTATUS=0&CHECKOUTSTATUS=PaymentActionNotInitiated&TIMESTAMP=2012%2d04%2d23T03%3a55%3a19Z&CORRELATIONID=cb5bd0e241c81&ACK=Success&VERSION=72%2e0&BUILD=2808426&EMAIL=fnando%2evieira%2bbr%40gmail%2ecom&PAYERID=D2U7M6PTMJBML&PAYERSTATUS=unverified&FIRSTNAME=Jos%c3%a9&LASTNAME=da%20Silva&COUNTRYCODE=BR&CURRENCYCODE=BRL&AMT=9%2e00&SHIPPINGAMT=0%2e00&HANDLINGAMT=0%2e00&TAXAMT=0%2e00&DESC=Awesome%20%2d%20Monthly%20Subscription&NOTIFYURL=http%3a%2f%2fexample%2ecom%2fpaypal%2fipn&INSURANCEAMT=0%2e00&SHIPDISCAMT=0%2e00&PAYMENTREQUEST_0_CURRENCYCODE=BRL&PAYMENTREQUEST_0_AMT=9%2e00&PAYMENTREQUEST_0_SHIPPINGAMT=0%2e00&PAYMENTREQUEST_0_HANDLINGAMT=0%2e00&PAYMENTREQUEST_0_TAXAMT=0%2e00&PAYMENTREQUEST_0_DESC=Awesome%20%2d%20Monthly%20Subscription&PAYMENTREQUEST_0_NOTIFYURL=http%3a%2f%2fexample%2ecom%2fpaypal%2fipn&PAYMENTREQUEST_0_INSURANCEAMT=0%2e00&PAYMENTREQUEST_0_SHIPDISCAMT=0%2e00&PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED=false&PAYMENTREQUESTINFO_0_ERRORCODE=0
36
+ http_version: '1.1'
37
+ recorded_at: Mon, 23 Apr 2012 03:55:20 GMT
38
+ recorded_with: VCR 2.1.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api-3t.sandbox.paypal.com/nvp
6
+ body:
7
+ encoding: US-ASCII
8
+ string: USER=fnando.vieira%2Bseller_api1.gmail.com&PWD=PRTZZX6JDACB95SA&SIGNATURE=AJnjtLN0ozBP-BF2ZJrj5sfbmGAxAnf5tev1-MgK5Z8IASmtj-Fw.5pt&VERSION=72.0&TOKEN&METHOD=GetExpressCheckoutDetails
9
+ headers:
10
+ accept:
11
+ - ! '*/*'
12
+ user-agent:
13
+ - PayPal::Recurring/0.1.8
14
+ content-type:
15
+ - application/x-www-form-urlencoded
16
+ connection:
17
+ - close
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ date:
24
+ - Mon, 23 Apr 2012 03:46:41 GMT
25
+ server:
26
+ - Apache
27
+ content-length:
28
+ - '214'
29
+ connection:
30
+ - close
31
+ content-type:
32
+ - text/plain; charset=utf-8
33
+ body:
34
+ encoding: US-ASCII
35
+ string: TIMESTAMP=2012%2d04%2d23T03%3a46%3a42Z&CORRELATIONID=2f58810ae5a1f&ACK=Failure&VERSION=72%2e0&BUILD=2808426&L_ERRORCODE0=10410&L_SHORTMESSAGE0=Invalid%20token&L_LONGMESSAGE0=Invalid%20token%2e&L_SEVERITYCODE0=Error
36
+ http_version: '1.1'
37
+ recorded_at: Mon, 23 Apr 2012 03:46:42 GMT
38
+ recorded_with: VCR 2.1.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api-3t.sandbox.paypal.com/nvp
6
+ body:
7
+ encoding: US-ASCII
8
+ string: USER=fnando.vieira%2Bseller_api1.gmail.com&PWD=PRTZZX6JDACB95SA&SIGNATURE=AJnjtLN0ozBP-BF2ZJrj5sfbmGAxAnf5tev1-MgK5Z8IASmtj-Fw.5pt&VERSION=72.0&TOKEN=EC-08C2125544495393T&METHOD=GetExpressCheckoutDetails
9
+ headers:
10
+ accept:
11
+ - ! '*/*'
12
+ user-agent:
13
+ - PayPal::Recurring/0.1.8
14
+ content-type:
15
+ - application/x-www-form-urlencoded
16
+ connection:
17
+ - close
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ date:
24
+ - Mon, 23 Apr 2012 03:46:33 GMT
25
+ server:
26
+ - Apache
27
+ content-length:
28
+ - '1048'
29
+ connection:
30
+ - close
31
+ content-type:
32
+ - text/plain; charset=utf-8
33
+ body:
34
+ encoding: US-ASCII
35
+ string: TOKEN=EC%2d08C2125544495393T&BILLINGAGREEMENTACCEPTEDSTATUS=1&CHECKOUTSTATUS=PaymentActionNotInitiated&TIMESTAMP=2012%2d04%2d23T03%3a46%3a33Z&CORRELATIONID=2d6423eb9e64d&ACK=Success&VERSION=72%2e0&BUILD=2808426&EMAIL=fnando%2evieira%2bbr%40gmail%2ecom&PAYERID=D2U7M6PTMJBML&PAYERSTATUS=unverified&FIRSTNAME=Jos%c3%a9&LASTNAME=da%20Silva&COUNTRYCODE=BR&TAXIDTYPE=BR_CPF&TAXID=42519601140&CURRENCYCODE=BRL&AMT=9%2e00&SHIPPINGAMT=0%2e00&HANDLINGAMT=0%2e00&TAXAMT=0%2e00&DESC=Awesome%20%2d%20Monthly%20Subscription&NOTIFYURL=http%3a%2f%2fexample%2ecom%2fpaypal%2fipn&INSURANCEAMT=0%2e00&SHIPDISCAMT=0%2e00&PAYMENTREQUEST_0_CURRENCYCODE=BRL&PAYMENTREQUEST_0_AMT=9%2e00&PAYMENTREQUEST_0_SHIPPINGAMT=0%2e00&PAYMENTREQUEST_0_HANDLINGAMT=0%2e00&PAYMENTREQUEST_0_TAXAMT=0%2e00&PAYMENTREQUEST_0_DESC=Awesome%20%2d%20Monthly%20Subscription&PAYMENTREQUEST_0_NOTIFYURL=http%3a%2f%2fexample%2ecom%2fpaypal%2fipn&PAYMENTREQUEST_0_INSURANCEAMT=0%2e00&PAYMENTREQUEST_0_SHIPDISCAMT=0%2e00&PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED=false&PAYMENTREQUESTINFO_0_ERRORCODE=0
36
+ http_version: '1.1'
37
+ recorded_at: Mon, 23 Apr 2012 03:46:34 GMT
38
+ recorded_with: VCR 2.1.0
@@ -0,0 +1,35 @@
1
+ {
2
+ "mc_gross":"9.00",
3
+ "invoice":"1234",
4
+ "protection_eligibility":"Ineligible",
5
+ "payer_id":"6KAQNBYBZ6KAC",
6
+ "tax":"0.00",
7
+ "payment_date":"20:37:01 Jul 04, 2011 PDT",
8
+ "payment_status":"Completed",
9
+ "charset":"windows-1252",
10
+ "first_name":"Test",
11
+ "mc_fee":"0.56",
12
+ "notify_version":"3.1",
13
+ "custom":"1234",
14
+ "payer_status":"verified",
15
+ "quantity":"1",
16
+ "verify_sign":"AZP9aUnslyCXgo2.9xWwtk8th8HXAnLqF6TgvmD3ME7fM.iCQhnQ0iRS",
17
+ "payer_email":"buyer_1309779460_per@simplesideias.com.br",
18
+ "txn_id":"8JD75017U43409907",
19
+ "payment_type":"instant",
20
+ "last_name":"User",
21
+ "receiver_email":"seller_1308793919_biz_api1.simplesideias.com.br",
22
+ "payment_fee":"0.56",
23
+ "receiver_id":"GSZCRUB62BL5L",
24
+ "txn_type":"express_checkout",
25
+ "item_name":"Awesome - Monthly Subscription",
26
+ "mc_currency":"USD",
27
+ "item_number":"",
28
+ "residence_country":"US",
29
+ "test_ipn":"1",
30
+ "handling_amount":"0.00",
31
+ "transaction_subject":"",
32
+ "payment_gross":"9.00",
33
+ "shipping":"0.00",
34
+ "ipn_track_id":"sAEWZiSm95ZxQfYHq-RE8w"
35
+ }