paymaya 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +13 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +75 -0
  5. data/.travis.yml +5 -0
  6. data/CODE_OF_CONDUCT.md +49 -0
  7. data/Gemfile +9 -0
  8. data/LICENSE.md +7 -0
  9. data/README.md +35 -0
  10. data/Rakefile +6 -0
  11. data/bin/console +14 -0
  12. data/bin/setup +8 -0
  13. data/fixtures/vcr_cassettes/create_card.yml +54 -0
  14. data/fixtures/vcr_cassettes/create_card_vault_payment.yml +55 -0
  15. data/fixtures/vcr_cassettes/create_checkout.yml +65 -0
  16. data/fixtures/vcr_cassettes/create_customer.yml +58 -0
  17. data/fixtures/vcr_cassettes/create_payment.yml +57 -0
  18. data/fixtures/vcr_cassettes/create_payment_token.yml +54 -0
  19. data/fixtures/vcr_cassettes/create_subscription.yml +54 -0
  20. data/fixtures/vcr_cassettes/delete_card.yml +50 -0
  21. data/fixtures/vcr_cassettes/delete_checkout_webhook.yml +107 -0
  22. data/fixtures/vcr_cassettes/delete_customer.yml +52 -0
  23. data/fixtures/vcr_cassettes/delete_payment_vault_webhook.yml +50 -0
  24. data/fixtures/vcr_cassettes/delete_subscription.yml +50 -0
  25. data/fixtures/vcr_cassettes/get_customization.yml +57 -0
  26. data/fixtures/vcr_cassettes/list_cards.yml +50 -0
  27. data/fixtures/vcr_cassettes/list_checkout_webhooks.yml +54 -0
  28. data/fixtures/vcr_cassettes/list_payment_vault_webhooks.yml +50 -0
  29. data/fixtures/vcr_cassettes/list_refunds.yml +51 -0
  30. data/fixtures/vcr_cassettes/list_subscription_payments.yml +52 -0
  31. data/fixtures/vcr_cassettes/list_subscriptions.yml +50 -0
  32. data/fixtures/vcr_cassettes/refund_payment.yml +54 -0
  33. data/fixtures/vcr_cassettes/register_checkout_webhook.yml +60 -0
  34. data/fixtures/vcr_cassettes/register_payment_vault_webhook.yml +54 -0
  35. data/fixtures/vcr_cassettes/remove_customization.yml +56 -0
  36. data/fixtures/vcr_cassettes/retrieve_card.yml +50 -0
  37. data/fixtures/vcr_cassettes/retrieve_checkout.yml +61 -0
  38. data/fixtures/vcr_cassettes/retrieve_customer.yml +52 -0
  39. data/fixtures/vcr_cassettes/retrieve_payment.yml +51 -0
  40. data/fixtures/vcr_cassettes/retrieve_payment_vault_webhook.yml +50 -0
  41. data/fixtures/vcr_cassettes/retrieve_refund.yml +51 -0
  42. data/fixtures/vcr_cassettes/retrieve_subscription.yml +50 -0
  43. data/fixtures/vcr_cassettes/set_customization.yml +62 -0
  44. data/fixtures/vcr_cassettes/update_card.yml +52 -0
  45. data/fixtures/vcr_cassettes/update_checkout_webhook.yml +113 -0
  46. data/fixtures/vcr_cassettes/update_customer.yml +56 -0
  47. data/fixtures/vcr_cassettes/update_payment_vault_webhook.yml +52 -0
  48. data/fixtures/vcr_cassettes/void_payment.yml +53 -0
  49. data/lib/paymaya.rb +28 -0
  50. data/lib/paymaya/checkout.rb +5 -0
  51. data/lib/paymaya/checkout/checkout.rb +35 -0
  52. data/lib/paymaya/checkout/customization.rb +37 -0
  53. data/lib/paymaya/checkout/webhook.rb +40 -0
  54. data/lib/paymaya/configuration.rb +22 -0
  55. data/lib/paymaya/helper.rb +114 -0
  56. data/lib/paymaya/payment_vault/card_vault/card.rb +44 -0
  57. data/lib/paymaya/payment_vault/card_vault/customer.rb +38 -0
  58. data/lib/paymaya/payment_vault/card_vault/payment.rb +24 -0
  59. data/lib/paymaya/payment_vault/card_vault/subscription.rb +50 -0
  60. data/lib/paymaya/payment_vault/payment.rb +58 -0
  61. data/lib/paymaya/payment_vault/payment_token.rb +20 -0
  62. data/lib/paymaya/payment_vault/webhook.rb +44 -0
  63. data/lib/paymaya/version.rb +4 -0
  64. data/paymaya.gemspec +29 -0
  65. metadata +205 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 73c484b3193b1c41bea803b7ae30717ec2572a5f
4
+ data.tar.gz: 27e248ea3c245cfcb70825404f2406e856775539
5
+ SHA512:
6
+ metadata.gz: d824b2b1b468a62a0ec43877343031d0fc0299b98f203657ca99aafef701d4bc793488eefb888dd47fed62ebe78c1a8359b7815f17bd1b39529f55f8ffcdd205
7
+ data.tar.gz: 3be163f632ad755e4e848ca836f9209f05ae58ff979975f68b5ec1da18088b4301ceea22d2c84bb553a2e511c46e4540b08c46987aa7452164fd4c468009711d
@@ -0,0 +1,13 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ .DS_Store
12
+
13
+ *.gem
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,75 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.3
3
+ Exclude:
4
+ - "Gemfile"
5
+ - "Rakefile"
6
+ - "bin/*"
7
+ - "paymaya.gemspec"
8
+
9
+ Lint/BlockAlignment:
10
+ AlignWith: start_of_block
11
+
12
+ Lint/EndAlignment:
13
+ AlignWith: variable
14
+
15
+ Metrics/ModuleLength:
16
+ Exclude:
17
+ - "**/*_spec.rb"
18
+
19
+ Metrics/BlockLength:
20
+ Exclude:
21
+ - "**/*_spec.rb"
22
+
23
+ Metrics/ParameterLists:
24
+ CountKeywordArgs: false
25
+
26
+ Rails:
27
+ Enabled: true
28
+
29
+ Rails/RequestReferer:
30
+ EnforcedStyle: referrer
31
+
32
+ Style/AlignParameters:
33
+ EnforcedStyle: with_fixed_indentation
34
+
35
+ Style/AutoResourceCleanup:
36
+ Enabled: true
37
+
38
+ # Style/ConditionalAssignment:
39
+ # EnforcedStyle: assign_inside_condition
40
+
41
+ Style/Documentation:
42
+ Enabled: false
43
+
44
+ Style/ExtraSpacing:
45
+ AllowForAlignment: false
46
+
47
+ Style/FirstArrayElementLineBreak:
48
+ Enabled: false
49
+
50
+ Style/FirstHashElementLineBreak:
51
+ Enabled: false
52
+
53
+ Style/HashSyntax:
54
+ EnforcedStyle: ruby19_no_mixed_keys
55
+
56
+ Style/IndentArray:
57
+ EnforcedStyle: consistent
58
+
59
+ Style/IndentHash:
60
+ EnforcedStyle: consistent
61
+
62
+ Style/MultilineMethodCallIndentation:
63
+ EnforcedStyle: indented
64
+
65
+ Style/MultilineOperationIndentation:
66
+ EnforcedStyle: indented
67
+
68
+ Style/OptionHash:
69
+ Enabled: true
70
+
71
+ Style/SafeNavigation:
72
+ ConvertTry: true
73
+
74
+ Style/TernaryParentheses:
75
+ EnforcedStyle: require_parentheses_when_complex
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.0
5
+ before_install: gem install bundler -v 1.12.5
@@ -0,0 +1,49 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This code of conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer at dan.suarez@voyagerinnovation.com. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
+ version 1.3.0, available at
46
+ [http://contributor-covenant.org/version/1/3/0/][version]
47
+
48
+ [homepage]: http://contributor-covenant.org
49
+ [version]: http://contributor-covenant.org/version/1/3/0/
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in paymaya.gemspec
4
+ gemspec
5
+
6
+ group :test do
7
+ gem 'vcr'
8
+ gem 'webmock'
9
+ end
@@ -0,0 +1,7 @@
1
+ Copyright (c) 2016 PayMaya Philippines, Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,35 @@
1
+ # PayMaya Ruby SDK
2
+
3
+ The PayMaya Ruby SDK allows your Ruby/Ruby on Rails app to accept payments from your customers using any MasterCard and Visa enabled card (credit, debit, or prepaid).
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'paymaya'
11
+ ```
12
+
13
+ Then execute:
14
+
15
+ $ bundle
16
+
17
+ ## Configuration
18
+
19
+ Configure the plugin by writing an initializer:
20
+
21
+ ```ruby
22
+ Paymaya.configure do |config|
23
+ config.mode = :sandbox
24
+ config.payment_vault_public_key = 'pk_abc123'
25
+ config.payment_vault_secret_key = 'sk_abc123'
26
+ config.checkout_public_key = 'pk_abc123'
27
+ config.checkout_secret_key = 'sk_abc123'
28
+ end
29
+ ```
30
+
31
+ Set `config.mode` to either `:sandbox` or `:prod` to switch between the sandbox and prod endpoints, and the keys to the corresponding keys provided by PayMaya.
32
+
33
+ ## Usage
34
+
35
+ See the [PayMaya Ruby SDK Wiki Page](https://github.com/PayMaya/paymaya-ruby-sdk/wiki) for more information regarding usage and integration.
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "paymaya"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://sk-GgVT0xX7YJcWBauR4UqnMkyFt8GpksixEUaV7qWnDJc:@pg-sandbox.paymaya.com/payments/v1/customers/5f39f980-225f-4805-b61f-50e84ce3fcdf/cards
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"paymentTokenId":"wdi6mkRvsaLNTiTOoMJD3GLUrdC0SdBvr7e6LbJvjxU2gjdr5k9Gynj0GQN7f9fofsDBlqy0Zzq6u4Vwhfd8hug0dCQo3NSb3RDV2GndnhmSEkKoY4eoAlxYaZUtJ4mFObMGGHxPmTaXZC9rBuPXe5JIZwFkzz5X1SXU","isDefault":true,"redirectUrl":{"success":"http://shop.server.com/success?id=123","failure":"http://shop.server.com/failure?id=123","cancel":"http://shop.server.com/cancel?id=123"}}'
9
+ headers:
10
+ Accept:
11
+ - "*/*"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - rest-client/2.0.0 (darwin15.0.0 x86_64) ruby/2.3.0p0
16
+ Content-Type:
17
+ - application/json
18
+ Content-Length:
19
+ - '366'
20
+ Host:
21
+ - pg-sandbox.paymaya.com
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Thu, 29 Dec 2016 02:41:57 GMT
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ Content-Length:
32
+ - '673'
33
+ Connection:
34
+ - close
35
+ Access-Control-Allow-Origin:
36
+ - "*"
37
+ Etag:
38
+ - W/"2a1-UJupYjf/a44Vfzsm3i8l1g"
39
+ Vary:
40
+ - X-HTTP-Method-Override
41
+ X-Content-Type-Options:
42
+ - nosniff
43
+ X-Frame-Options:
44
+ - DENY
45
+ X-Xss-Protection:
46
+ - 1; mode=block
47
+ Via:
48
+ - kong/0.4.2
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"state":"PREVERIFICATION","cardTokenId":"wdi6mkRvsaLNTiTOoMJD3GLUrdC0SdBvr7e6LbJvjxU2gjdr5k9Gynj0GQN7f9fofsDBlqy0Zzq6u4Vwhfd8hug0dCQo3NSb3RDV2GndnhmSEkKoY4eoAlxYaZUtJ4mFObMGGHxPmTaXZC9rBuPXe5JIZwFkzz5X1SXU","cardType":"master-card","maskedPan":"2346","verificationUrl":"https://sandbox-checkout-v2.paymaya.com/checkout?id=0328c8b9-e222-45f2-830a-5543e13c0841&auto=Y&ct=wdi6mkRvsaLNTiTOoMJD3GLUrdC0SdBvr7e6LbJvjxU2gjdr5k9Gynj0GQN7f9fofsDBlqy0Zzq6u4Vwhfd8hug0dCQo3NSb3RDV2GndnhmSEkKoY4eoAlxYaZUtJ4mFObMGGHxPmTaXZC9rBuPXe5JIZwFkzz5X1SXU","default":true,"createdAt":"2016-12-29T02:41:57.000Z","updatedAt":"2016-12-29T02:41:57.000Z","id":"69703747-6c9f-4baf-867e-880cd565044a"}'
52
+ http_version:
53
+ recorded_at: Thu, 29 Dec 2016 02:41:57 GMT
54
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,55 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://sk-GgVT0xX7YJcWBauR4UqnMkyFt8GpksixEUaV7qWnDJc:@pg-sandbox.paymaya.com/payments/v1/customers/5f39f980-225f-4805-b61f-50e84ce3fcdf/cards/wdi6mkRvsaLNTiTOoMJD3GLUrdC0SdBvr7e6LbJvjxU2gjdr5k9Gynj0GQN7f9fofsDBlqy0Zzq6u4Vwhfd8hug0dCQo3NSb3RDV2GndnhmSEkKoY4eoAlxYaZUtJ4mFObMGGHxPmTaXZC9rBuPXe5JIZwFkzz5X1SXU/payments
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"totalAmount":{"amount":150,"currency":"PHP"}}'
9
+ headers:
10
+ Accept:
11
+ - "*/*"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - rest-client/2.0.0 (darwin15.0.0 x86_64) ruby/2.3.0p0
16
+ Content-Type:
17
+ - application/json
18
+ Content-Length:
19
+ - '47'
20
+ Host:
21
+ - pg-sandbox.paymaya.com
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Thu, 29 Dec 2016 03:23:36 GMT
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ Content-Length:
32
+ - '427'
33
+ Connection:
34
+ - close
35
+ Access-Control-Allow-Origin:
36
+ - "*"
37
+ Etag:
38
+ - W/"1ab-94lBB/FUWTCRrKaIsekHyw"
39
+ Vary:
40
+ - X-HTTP-Method-Override
41
+ X-Content-Type-Options:
42
+ - nosniff
43
+ X-Frame-Options:
44
+ - DENY
45
+ X-Xss-Protection:
46
+ - 1; mode=block
47
+ Via:
48
+ - kong/0.4.2
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"id":"4f9a91c7-22f5-4829-b992-2eeca5319fa8","isPaid":true,"status":"PAYMENT_SUCCESS","amount":150,"currency":"PHP","createdAt":"2016-12-29T03:23:32.000Z","updatedAt":"2016-12-29T03:23:36.000Z","description":"Charge
52
+ for ysadcsantos@gmail.com","paymentTokenId":"wdi6mkRvsaLNTiTOoMJD3GLUrdC0SdBvr7e6LbJvjxU2gjdr5k9Gynj0GQN7f9fofsDBlqy0Zzq6u4Vwhfd8hug0dCQo3NSb3RDV2GndnhmSEkKoY4eoAlxYaZUtJ4mFObMGGHxPmTaXZC9rBuPXe5JIZwFkzz5X1SXU"}'
53
+ http_version:
54
+ recorded_at: Thu, 29 Dec 2016 03:23:35 GMT
55
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,65 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://pk-8rOz4MQKRxd5OLKBPcR6FIUx4Kay71kB3UrBFDaH172:@pg-sandbox.paymaya.com/checkout/v1/checkouts
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"totalAmount":{"currency":"PHP","value":"1234.56"},"buyer":{"firstName":"Juan","middleName":"dela","lastName":"Cruz","contact":{"phone":"+63(2)1234567890","email":"paymayabuyer1@gmail.com"},"shippingAddress":{"line1":"9F
9
+ Robinsons Cybergate 3","line2":"Pioneer Street","city":"Mandaluyong City","state":"Metro
10
+ Manila","zipCode":"12345","countryCode":"PH"},"billingAddress":{"line1":"9F
11
+ Robinsons Cybergate 3","line2":"Pioneer Street","city":"Mandaluyong City","state":"Metro
12
+ Manila","zipCode":"12345","countryCode":"PH"},"ipAddress":"125.60.148.241"},"items":[{"name":"Canvas
13
+ Slip Ons","code":"CVG-096732","description":"Shoes","quantity":"3","amount":{"value":"1621.10","details":{"discount":"100.00","subtotal":"1721.10"}},"totalAmount":{"value":"4863.30","details":{"discount":"300.00","subtotal":"5163.30"}}}],"redirectUrl":{"success":"http://www.askthemaya.com/","failure":"http://www.askthemaya.com/failure?id=6319921","cancel":"http://www.askthemaya.com/cancel?id=6319921"},"requestReferenceNumber":"000141386713","metadata":{}}'
14
+ headers:
15
+ Accept:
16
+ - "*/*"
17
+ Accept-Encoding:
18
+ - gzip, deflate
19
+ User-Agent:
20
+ - rest-client/2.0.0 (darwin15.0.0 x86_64) ruby/2.3.0p0
21
+ Content-Type:
22
+ - application/json
23
+ Content-Length:
24
+ - '1036'
25
+ Host:
26
+ - pg-sandbox.paymaya.com
27
+ response:
28
+ status:
29
+ code: 200
30
+ message: OK
31
+ headers:
32
+ Date:
33
+ - Sun, 25 Dec 2016 22:22:31 GMT
34
+ Content-Type:
35
+ - application/json; charset=utf-8
36
+ Content-Length:
37
+ - '158'
38
+ Connection:
39
+ - close
40
+ Access-Control-Allow-Origin:
41
+ - "*"
42
+ Vary:
43
+ - X-HTTP-Method-Override
44
+ X-Content-Type-Options:
45
+ - nosniff
46
+ Strict-Transport-Security:
47
+ - max-age=31536000
48
+ Cache-Control:
49
+ - private, no-cache, no-store, must-revalidate, max-age=0
50
+ Pragma:
51
+ - no-cache
52
+ X-Xss-Protection:
53
+ - 1; mode=block
54
+ X-Frame-Options:
55
+ - DENY
56
+ Etag:
57
+ - W/"9e-I1P2Hi+OepQGimCn6+sz3g"
58
+ Via:
59
+ - kong/0.4.2
60
+ body:
61
+ encoding: UTF-8
62
+ string: '{"checkoutId":"f739d287-7cbf-44eb-8a59-0e64562521b2","redirectUrl":"https://sandbox-checkout-v2.paymaya.com/checkout?id=f739d287-7cbf-44eb-8a59-0e64562521b2"}'
63
+ http_version:
64
+ recorded_at: Sun, 25 Dec 2016 22:22:30 GMT
65
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://sk-dOxQfFiCZ7ImhHAsLLTVPpuVt3XBtqPzbcpeJa3TBJv:@pg-sandbox.paymaya.com/payments/v1/customers
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"firstName":"Ysabelle","middleName":"Cruz","lastName":"Santos","birthday":"1987-01-01","sex":"F","contact":{"phone":"+63(2)1234567890","email":"ysadcsantos@gmail.com"},"billingAddress":{"line1":"9F
9
+ Robinsons Cybergate 3","line2":"Pioneer Street","city":"Mandaluyong City","state":"Metro
10
+ Manila","zipCode":"12345","countryCode":"PH"},"metadata":{}}'
11
+ headers:
12
+ Accept:
13
+ - "*/*"
14
+ Accept-Encoding:
15
+ - gzip, deflate
16
+ User-Agent:
17
+ - rest-client/2.0.0 (darwin15.0.0 x86_64) ruby/2.3.0p0
18
+ Content-Type:
19
+ - application/json
20
+ Content-Length:
21
+ - '348'
22
+ Host:
23
+ - pg-sandbox.paymaya.com
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Date:
30
+ - Wed, 28 Dec 2016 19:15:12 GMT
31
+ Content-Type:
32
+ - application/json; charset=utf-8
33
+ Content-Length:
34
+ - '456'
35
+ Connection:
36
+ - close
37
+ Access-Control-Allow-Origin:
38
+ - "*"
39
+ Etag:
40
+ - W/"1c8-rNgvPEYNh16Npqa0tyTgcg"
41
+ Vary:
42
+ - X-HTTP-Method-Override
43
+ X-Content-Type-Options:
44
+ - nosniff
45
+ X-Frame-Options:
46
+ - DENY
47
+ X-Xss-Protection:
48
+ - 1; mode=block
49
+ Via:
50
+ - kong/0.4.2
51
+ body:
52
+ encoding: UTF-8
53
+ string: '{"id":"c52866a8-c30f-4233-afd4-473b069ac751","firstName":"Ysabelle","middleName":"Cruz","lastName":"Santos","contact":{"phone":"+63(2)1234567890","email":"ysadcsantos@gmail.com"},"billingAddress":{"line1":"9F
54
+ Robinsons Cybergate 3","line2":"Pioneer Street","city":"Mandaluyong City","state":"Metro
55
+ Manila","zipCode":"12345","countryCode":"PH"},"sex":"F","birthday":"1987-01-01","createdAt":"2016-12-28T19:15:12.000Z","updatedAt":"2016-12-28T19:15:12.000Z"}'
56
+ http_version:
57
+ recorded_at: Wed, 28 Dec 2016 19:15:12 GMT
58
+ recorded_with: VCR 3.0.3