adyen-ruby-api-library 9.6.0 → 9.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/VERSION +1 -1
- data/lib/adyen/client.rb +8 -3
- data/lib/adyen/services/checkout/donations_api.rb +9 -0
- data/lib/adyen/version.rb +1 -1
- metadata +2 -16
- data/docs/checkout.html +0 -128
- data/docs/index.html +0 -50
- data/docs/install-library.html +0 -61
- data/docs/javascripts/prism.js +0 -5
- data/docs/javascripts/scale.fix.js +0 -17
- data/docs/marketpay.html +0 -171
- data/docs/params.json +0 -1
- data/docs/payment.html +0 -106
- data/docs/payout.html +0 -135
- data/docs/recurring.html +0 -113
- data/docs/stylesheets/github-light.css +0 -115
- data/docs/stylesheets/prism.css +0 -140
- data/docs/stylesheets/styles.css +0 -324
- data/docs/using-library.html +0 -67
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 609202da12a0d8c2575ca56f58e5ef297558d73964a6bffd274f7f2513b348f7
|
4
|
+
data.tar.gz: 7f20453a9afd7e59edd7fa45c6ce243a04bf49dc4b3259766f9be47740ce757c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c18e1d385f3732be2de589bf734e896494eca5db07afae72a12ca8fafc687c6eb49ca26bc5a8447d32e438a3ea853a9ded09bc244674675526eb16d4c4b57c8a
|
7
|
+
data.tar.gz: e58aec5a1435767077904030766f128d15877ddfc3ae0f0c86bc126f4c15d63995f4898ce8d0d56328b27e0e664ed764fccbc705a337871584cc4aa7a1a70729
|
data/README.md
CHANGED
@@ -24,6 +24,8 @@ This library supports the following:
|
|
24
24
|
| [Cloud-based Terminal API](https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/terminal-api-reference/) | - | Our point-of-sale integration. | [TerminalCloudAPI](lib/adyen/services/terminalCloudAPI.rb) |
|
25
25
|
| [Disputes API](https://docs.adyen.com/api-explorer/Disputes/30/overview) | v30 | You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. | [Disputes](lib/adyen/services/disputes.rb) |
|
26
26
|
| [POS Mobile API](https://docs.adyen.com/api-explorer/possdk/68/overview) | v68 | The POS Mobile API is used in the mutual authentication flow between an Adyen Android or iOS [POS Mobile SDK](https://docs.adyen.com/point-of-sale/ipp-mobile/) and the Adyen payments platform. The POS Mobile SDK for Android or iOS devices enables businesses to accept in-person payments using a commercial off-the-shelf (COTS) device like a phone. For example, Tap to Pay transactions, or transactions on a mobile device in combination with a card reader. | [POS Mobile](lib/adyen/services/posMobile.rb) |
|
27
|
+
| [Payments App API](https://docs.adyen.com/api-explorer/payments-app/1/overview) | v1 | The Payments App API is used to Board and manage the Adyen Payments App on your Android mobile devices. | [paymentsApp](lib/adyen/services/paymentsApp.rb) |
|
28
|
+
|
27
29
|
|
28
30
|
|
29
31
|
For more information, refer to our [documentation](https://docs.adyen.com/) or the [API Explorer](https://docs.adyen.com/api-explorer/).
|
data/VERSION
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
9.
|
1
|
+
9.7.1
|
2
2
|
|
data/lib/adyen/client.rb
CHANGED
@@ -13,10 +13,10 @@ require_relative './result'
|
|
13
13
|
module Adyen
|
14
14
|
class Client
|
15
15
|
attr_accessor :ws_user, :ws_password, :api_key, :oauth_token, :client, :adapter
|
16
|
-
attr_reader :env, :connection_options, :adapter_options
|
16
|
+
attr_reader :env, :connection_options, :adapter_options, :terminal_region
|
17
17
|
|
18
18
|
def initialize(ws_user: nil, ws_password: nil, api_key: nil, oauth_token: nil, env: :live, adapter: nil, mock_port: 3001,
|
19
|
-
live_url_prefix: nil, mock_service_url_base: nil, connection_options: nil, adapter_options: nil)
|
19
|
+
live_url_prefix: nil, mock_service_url_base: nil, connection_options: nil, adapter_options: nil, terminal_region: nil)
|
20
20
|
@ws_user = ws_user
|
21
21
|
@ws_password = ws_password
|
22
22
|
@api_key = api_key
|
@@ -33,6 +33,7 @@ module Adyen
|
|
33
33
|
@mock_service_url_base = mock_service_url_base || "http://localhost:#{mock_port}"
|
34
34
|
@live_url_prefix = live_url_prefix
|
35
35
|
@connection_options = connection_options || Faraday::ConnectionOptions.new
|
36
|
+
@terminal_region = terminal_region
|
36
37
|
end
|
37
38
|
|
38
39
|
# make sure that env can only be :live, :test, or :mock
|
@@ -84,7 +85,11 @@ module Adyen
|
|
84
85
|
url = "https://management-#{@env}.adyen.com"
|
85
86
|
supports_live_url_prefix = false
|
86
87
|
when 'TerminalCloudAPI'
|
87
|
-
url =
|
88
|
+
url = if !terminal_region.nil?
|
89
|
+
"https://terminal-api-#{@env}-#{terminal_region}.adyen.com"
|
90
|
+
else
|
91
|
+
"https://terminal-api-#{@env}.adyen.com"
|
92
|
+
end
|
88
93
|
supports_live_url_prefix = false
|
89
94
|
else
|
90
95
|
raise ArgumentError, 'Invalid service specified'
|
@@ -7,6 +7,15 @@ module Adyen
|
|
7
7
|
super(client, version, 'Checkout')
|
8
8
|
end
|
9
9
|
|
10
|
+
def donation_campaigns(request, headers: {})
|
11
|
+
endpoint = '/donationCampaigns'.gsub(/{.+?}/, '%s')
|
12
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
13
|
+
endpoint = format(endpoint)
|
14
|
+
|
15
|
+
action = { method: 'post', url: endpoint }
|
16
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
17
|
+
end
|
18
|
+
|
10
19
|
def donations(request, headers: {})
|
11
20
|
endpoint = '/donations'.gsub(/{.+?}/, '%s')
|
12
21
|
endpoint = endpoint.gsub(%r{^/}, '')
|
data/lib/adyen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adyen-ruby-api-library
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.
|
4
|
+
version: 9.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -101,20 +101,6 @@ files:
|
|
101
101
|
- adyen-ruby-api-library.gemspec
|
102
102
|
- bin/console
|
103
103
|
- bin/setup
|
104
|
-
- docs/checkout.html
|
105
|
-
- docs/index.html
|
106
|
-
- docs/install-library.html
|
107
|
-
- docs/javascripts/prism.js
|
108
|
-
- docs/javascripts/scale.fix.js
|
109
|
-
- docs/marketpay.html
|
110
|
-
- docs/params.json
|
111
|
-
- docs/payment.html
|
112
|
-
- docs/payout.html
|
113
|
-
- docs/recurring.html
|
114
|
-
- docs/stylesheets/github-light.css
|
115
|
-
- docs/stylesheets/prism.css
|
116
|
-
- docs/stylesheets/styles.css
|
117
|
-
- docs/using-library.html
|
118
104
|
- lib/adyen-ruby-api-library.rb
|
119
105
|
- lib/adyen/client.rb
|
120
106
|
- lib/adyen/errors.rb
|
data/docs/checkout.html
DELETED
@@ -1,128 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
6
|
-
<title>Adyen-ruby-api-library by Adyen</title>
|
7
|
-
|
8
|
-
<link rel="stylesheet" href="stylesheets/styles.css">
|
9
|
-
<link rel="stylesheet" href="stylesheets/github-light.css">
|
10
|
-
<meta name="viewport" content="width=device-width">
|
11
|
-
|
12
|
-
<link rel="stylesheet" href="stylesheets/prism.css">
|
13
|
-
<script src="javascripts/prism.js"></script>
|
14
|
-
<!--[if lt IE 9]>
|
15
|
-
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
16
|
-
<![endif]-->
|
17
|
-
</head>
|
18
|
-
<body>
|
19
|
-
<div class="wrapper">
|
20
|
-
<header>
|
21
|
-
<h1>Adyen-ruby-api-library</h1>
|
22
|
-
<p>Adyen API Library for ruby</p>
|
23
|
-
|
24
|
-
<p class="view"><a href="https://github.com/Adyen/adyen-ruby-api-library">View the Project on GitHub <small>Adyen/adyen-ruby-api-library</small></a></p>
|
25
|
-
<ul>
|
26
|
-
<li><a href="https://github.com/Adyen/adyen-ruby-api-library/zipball/main">Download <strong>ZIP File</strong></a></li>
|
27
|
-
<li><a href="https://github.com/Adyen/adyen-ruby-api-library/tarball/main">Download <strong>TAR Ball</strong></a></li>
|
28
|
-
<li><a href="https://github.com/Adyen/adyen-ruby-api-library">View On <strong>GitHub</strong></a></li>
|
29
|
-
</ul>
|
30
|
-
</header>
|
31
|
-
<section>
|
32
|
-
<h2 id="availablemethods">Available methods</h2>
|
33
|
-
|
34
|
-
<ul>
|
35
|
-
<li>payment_session</li>
|
36
|
-
|
37
|
-
<li>payments.result</li>
|
38
|
-
|
39
|
-
<li>payment_methods</li>
|
40
|
-
|
41
|
-
<li>payments</li>
|
42
|
-
|
43
|
-
<li>payments.details</li>
|
44
|
-
|
45
|
-
<li>payment_links</li>
|
46
|
-
</ul>
|
47
|
-
|
48
|
-
<h2 id="authentication">Authentication</h2>
|
49
|
-
|
50
|
-
<p>Checkout is authenticated via api-key:
|
51
|
-
<pre><code class="ruby language-ruby">adyen.api_key = "AP5XXXXXXXXX"</code></pre></p>
|
52
|
-
|
53
|
-
<h2 id="usagecheckoutsdk">Usage - Checkout SDK</h2>
|
54
|
-
|
55
|
-
<p>Checkout SDK is a javascript library which loads an Adyen-hosted iframe into your website. Once loaded, it communicates directly with Adyen, abstracting away all server communication and lowering your PCI compliance load.</p>
|
56
|
-
|
57
|
-
<p>The front-end is described <a href="https://docs.adyen.com/developers/checkout/integrations-overview">here</a>
|
58
|
-
</p>
|
59
|
-
|
60
|
-
<p>To perform the initial paymentSession call to Adyen, call its method as below:</p>
|
61
|
-
|
62
|
-
<pre><code class="ruby language-ruby">response = adyen.checkout.paymentSession('{
|
63
|
-
"amount": {
|
64
|
-
"value": 1500,
|
65
|
-
"currency": "EUR"
|
66
|
-
},
|
67
|
-
"countryCode": "US",
|
68
|
-
"origin": "www.example.com",
|
69
|
-
"returnUrl": "www.example.com",
|
70
|
-
"reference": "Merchant Reference",
|
71
|
-
"merchantAccount": "TestMerchant"
|
72
|
-
}')</code></pre>
|
73
|
-
|
74
|
-
<p>Then send the response to the client-side javascript library to initialize the SDK.</p>
|
75
|
-
|
76
|
-
<h2 id="usagecheckoutapi">Usage - Checkout API</h2>
|
77
|
-
|
78
|
-
<p>Raw payment method details can be sent directly to Adyen through the Checkout API. For instance, to send raw credit card data you could use a request like the below:</p>
|
79
|
-
|
80
|
-
<pre><code class="ruby language-ruby">response = adyen.checkout.payments('{
|
81
|
-
"card": {
|
82
|
-
"number": "4111111111111111",
|
83
|
-
"expiryMonth": "8",
|
84
|
-
"expiryYear": "2018",
|
85
|
-
"cvc": "737",
|
86
|
-
"holderName": "John Smith"
|
87
|
-
},
|
88
|
-
"amount": {
|
89
|
-
"value": 1500,
|
90
|
-
"currency": "EUR"
|
91
|
-
},
|
92
|
-
"reference": "YOUR_REFERENCE",
|
93
|
-
"merchantAccount": "YOUR_MERCHANT_ACCOUNT"
|
94
|
-
}')</code></pre>
|
95
|
-
|
96
|
-
<p>You can also get a list of payment methods which are available for a given transaction to display a page with custom styling to your shoppers:</p>
|
97
|
-
|
98
|
-
<pre><code class="ruby language-ruby">response = adyen.checkout.payment_methods('{
|
99
|
-
"merchantAccount": "YOUR_MERCHANT_ACCOUNT"
|
100
|
-
}')</code></pre>
|
101
|
-
|
102
|
-
<p>A successful call to payment_methods will return a list of supported payment methods along with redirect URL's so that you can send your shoppers directly to the issuer's site without losing control of front-end styling / logic.</p>
|
103
|
-
|
104
|
-
You can also create a link to Adyen's hosted payment form:
|
105
|
-
|
106
|
-
<pre><code class="ruby language-ruby">response = adyen.checkout.payment_links('{
|
107
|
-
"amount": {
|
108
|
-
"value": 1500,
|
109
|
-
"currency": "EUR"
|
110
|
-
},
|
111
|
-
"countryCode": "US",
|
112
|
-
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
|
113
|
-
"reference": "YOUR_REFERENCE"
|
114
|
-
}')</code></pre>
|
115
|
-
|
116
|
-
<p>A successful call to payment_links will return a url, which directs a user to Adyen's hosted payment form.</p>
|
117
|
-
</section>
|
118
|
-
|
119
|
-
|
120
|
-
<footer>
|
121
|
-
<p>This project is maintained by <a href="https://github.com/Adyen">Adyen</a></p>
|
122
|
-
<p><small>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
|
123
|
-
</footer>
|
124
|
-
</div>
|
125
|
-
<script src="javascripts/scale.fix.js"></script>
|
126
|
-
|
127
|
-
</body>
|
128
|
-
</html>
|
data/docs/index.html
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
6
|
-
<title>Adyen-ruby-api-library by Adyen</title>
|
7
|
-
|
8
|
-
<link rel="stylesheet" href="stylesheets/styles.css">
|
9
|
-
<link rel="stylesheet" href="stylesheets/github-light.css">
|
10
|
-
<meta name="viewport" content="width=device-width">
|
11
|
-
<!--[if lt IE 9]>
|
12
|
-
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
13
|
-
<![endif]-->
|
14
|
-
</head>
|
15
|
-
<body>
|
16
|
-
<div class="wrapper">
|
17
|
-
<header>
|
18
|
-
<h1>Adyen-ruby-api-library</h1>
|
19
|
-
<p>Adyen API Library for Ruby</p>
|
20
|
-
|
21
|
-
<p class="view"><a href="https://github.com/Adyen/adyen-ruby-api-library">View the Project on GitHub <small>Adyen/adyen-ruby-api-library</small></a></p>
|
22
|
-
|
23
|
-
<ul>
|
24
|
-
<li><a href="https://github.com/Adyen/adyen-ruby-api-library/zipball/main">Download <strong>ZIP File</strong></a></li>
|
25
|
-
<li><a href="https://github.com/Adyen/adyen-ruby-api-library/tarball/main">Download <strong>TAR Ball</strong></a></li>
|
26
|
-
<li><a href="https://github.com/Adyen/adyen-ruby-api-library">View On <strong>GitHub</strong></a></li>
|
27
|
-
</ul>
|
28
|
-
</header>
|
29
|
-
<section>
|
30
|
-
<h1><a id="adyen-apis-library-for-ruby" class="anchor" href="#adyen-apis-library-for-ruby" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Adyen APIs Library for Ruby</h1>
|
31
|
-
<p>
|
32
|
-
This manual describes API communication to the Adyen payment system using this API library for Ruby.
|
33
|
-
You will get familiar with the following concepts and scenarios:
|
34
|
-
</p>
|
35
|
-
<ul>
|
36
|
-
<li><a title="Install the library" href="install-library.html">Install the library</a></li>
|
37
|
-
<li><a title="Using the library" href="using-library.html">Using the library</a></li>
|
38
|
-
</ul>
|
39
|
-
<h2>DISCLAIMER</h2>
|
40
|
-
<p>The ownership of the content of the Adyen API Library remains with Adyen. The content of the Adyen API Library may only be used in connection with the services of Adyen and subject to the applicable license (Apache License, Version 2.0, the “License”), a copy of which is included in the library. Unless required by applicable law or agreed to in writing, the library is offered and/or distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Adyen does not warrant that the library or any content will be available uninterrupted or error free, that defects will be corrected, or that the library or its supporting systems are free of viruses or bugs. Please refer to the License for the specific language governing permissions and limitations under the License.</p>
|
41
|
-
</section>
|
42
|
-
<footer>
|
43
|
-
<p>This project is maintained by <a href="https://github.com/Adyen">Adyen</a></p>
|
44
|
-
<p><small>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
|
45
|
-
</footer>
|
46
|
-
</div>
|
47
|
-
<script src="javascripts/scale.fix.js"></script>
|
48
|
-
|
49
|
-
</body>
|
50
|
-
</html>
|
data/docs/install-library.html
DELETED
@@ -1,61 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
6
|
-
<title>Adyen-php-api-library by Adyen</title>
|
7
|
-
|
8
|
-
<link rel="stylesheet" href="stylesheets/styles.css">
|
9
|
-
<link rel="stylesheet" href="stylesheets/github-light.css">
|
10
|
-
<meta name="viewport" content="width=device-width">
|
11
|
-
|
12
|
-
<link rel="stylesheet" href="stylesheets/prism.css">
|
13
|
-
<script src="javascripts/prism.js"></script>
|
14
|
-
<!--[if lt IE 9]>
|
15
|
-
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
16
|
-
<![endif]-->
|
17
|
-
</head>
|
18
|
-
<body>
|
19
|
-
<div class="wrapper">
|
20
|
-
<header>
|
21
|
-
<h1>Adyen-ruby-api-library</h1>
|
22
|
-
<p>Adyen API Library for Ruby</p>
|
23
|
-
|
24
|
-
<p class="view"><a href="https://github.com/Adyen/adyen-ruby-api-library">View the Project on GitHub <small>Adyen/adyen-ruby-api-library</small></a></p>
|
25
|
-
|
26
|
-
|
27
|
-
<ul>
|
28
|
-
<li><a href="https://github.com/Adyen/adyen-ruby-api-library/zipball/main">Download <strong>ZIP File</strong></a></li>
|
29
|
-
<li><a href="https://github.com/Adyen/adyen-ruby-api-library/tarball/main">Download <strong>TAR Ball</strong></a></li>
|
30
|
-
<li><a href="https://github.com/Adyen/adyen-ruby-api-library">View On <strong>GitHub</strong></a></li>
|
31
|
-
</ul>
|
32
|
-
</header>
|
33
|
-
<section>
|
34
|
-
<h1>Install the library</h1>
|
35
|
-
<p>
|
36
|
-
<h2>Requirements:</h2>
|
37
|
-
<ul>
|
38
|
-
<li>Ruby >= 2.1</li>
|
39
|
-
</ul>
|
40
|
-
</p>
|
41
|
-
<h2>Installation</h2>
|
42
|
-
<p>
|
43
|
-
<ol>
|
44
|
-
<li>
|
45
|
-
The preferred method is via <a href="https://www.rubygems.org/packages/Adyen.EcommLibrary">RubyGems</a>.
|
46
|
-
</li>
|
47
|
-
<li>
|
48
|
-
Download Release from GitHub: Go to our GitHub releases tab and download the zip file that is included in the release.
|
49
|
-
</li>
|
50
|
-
</ol>
|
51
|
-
</p>
|
52
|
-
</section>
|
53
|
-
<footer>
|
54
|
-
<p>This project is maintained by <a href="https://github.com/Adyen">Adyen</a></p>
|
55
|
-
<p><small>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
|
56
|
-
</footer>
|
57
|
-
</div>
|
58
|
-
<script src="javascripts/scale.fix.js"></script>
|
59
|
-
|
60
|
-
</body>
|
61
|
-
</html>
|
data/docs/javascripts/prism.js
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
/* PrismJS 1.14.0
|
2
|
-
http://prismjs.com/download.html#themes=prism&languages=clike+ruby */
|
3
|
-
var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof r?new r(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function(e,t){var r=n.util.type(e);switch(t=t||{},r){case"Object":if(t[n.util.objId(e)])return t[n.util.objId(e)];var a={};t[n.util.objId(e)]=a;for(var l in e)e.hasOwnProperty(l)&&(a[l]=n.util.clone(e[l],t));return a;case"Array":if(t[n.util.objId(e)])return t[n.util.objId(e)];var a=[];return t[n.util.objId(e)]=a,e.forEach(function(e,r){a[r]=n.util.clone(e,t)}),a}return e}},languages:{extend:function(e,t){var r=n.util.clone(n.languages[e]);for(var a in t)r[a]=t[a];return r},insertBefore:function(e,t,r,a){a=a||n.languages;var l=a[e];if(2==arguments.length){r=arguments[1];for(var i in r)r.hasOwnProperty(i)&&(l[i]=r[i]);return l}var o={};for(var s in l)if(l.hasOwnProperty(s)){if(s==t)for(var i in r)r.hasOwnProperty(i)&&(o[i]=r[i]);o[s]=l[s]}return n.languages.DFS(n.languages,function(t,n){n===a[e]&&t!=e&&(this[t]=o)}),a[e]=o},DFS:function(e,t,r,a){a=a||{};for(var l in e)e.hasOwnProperty(l)&&(t.call(e,l,e[l],r||l),"Object"!==n.util.type(e[l])||a[n.util.objId(e[l])]?"Array"!==n.util.type(e[l])||a[n.util.objId(e[l])]||(a[n.util.objId(e[l])]=!0,n.languages.DFS(e[l],t,l,a)):(a[n.util.objId(e[l])]=!0,n.languages.DFS(e[l],t,null,a)))}},plugins:{},highlightAll:function(e,t){n.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,r){var a={callback:r,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};n.hooks.run("before-highlightall",a);for(var l,i=a.elements||e.querySelectorAll(a.selector),o=0;l=i[o++];)n.highlightElement(l,t===!0,a.callback)},highlightElement:function(t,r,a){for(var l,i,o=t;o&&!e.test(o.className);)o=o.parentNode;o&&(l=(o.className.match(e)||[,""])[1].toLowerCase(),i=n.languages[l]),t.className=t.className.replace(e,"").replace(/\s+/g," ")+" language-"+l,t.parentNode&&(o=t.parentNode,/pre/i.test(o.nodeName)&&(o.className=o.className.replace(e,"").replace(/\s+/g," ")+" language-"+l));var s=t.textContent,u={element:t,language:l,grammar:i,code:s};if(n.hooks.run("before-sanity-check",u),!u.code||!u.grammar)return u.code&&(n.hooks.run("before-highlight",u),u.element.textContent=u.code,n.hooks.run("after-highlight",u)),n.hooks.run("complete",u),void 0;if(n.hooks.run("before-highlight",u),r&&_self.Worker){var g=new Worker(n.filename);g.onmessage=function(e){u.highlightedCode=e.data,n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,a&&a.call(u.element),n.hooks.run("after-highlight",u),n.hooks.run("complete",u)},g.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else u.highlightedCode=n.highlight(u.code,u.grammar,u.language),n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,a&&a.call(t),n.hooks.run("after-highlight",u),n.hooks.run("complete",u)},highlight:function(e,t,a){var l={code:e,grammar:t,language:a};return n.hooks.run("before-tokenize",l),l.tokens=n.tokenize(l.code,l.grammar),n.hooks.run("after-tokenize",l),r.stringify(n.util.encode(l.tokens),l.language)},matchGrammar:function(e,t,r,a,l,i,o){var s=n.Token;for(var u in r)if(r.hasOwnProperty(u)&&r[u]){if(u==o)return;var g=r[u];g="Array"===n.util.type(g)?g:[g];for(var c=0;c<g.length;++c){var h=g[c],f=h.inside,d=!!h.lookbehind,m=!!h.greedy,p=0,y=h.alias;if(m&&!h.pattern.global){var v=h.pattern.toString().match(/[imuy]*$/)[0];h.pattern=RegExp(h.pattern.source,v+"g")}h=h.pattern||h;for(var b=a,k=l;b<t.length;k+=t[b].length,++b){var w=t[b];if(t.length>e.length)return;if(!(w instanceof s)){if(m&&b!=t.length-1){h.lastIndex=k;var _=h.exec(e);if(!_)break;for(var j=_.index+(d?_[1].length:0),P=_.index+_[0].length,A=b,x=k,O=t.length;O>A&&(P>x||!t[A].type&&!t[A-1].greedy);++A)x+=t[A].length,j>=x&&(++b,k=x);if(t[b]instanceof s)continue;I=A-b,w=e.slice(k,x),_.index-=k}else{h.lastIndex=0;var _=h.exec(w),I=1}if(_){d&&(p=_[1]?_[1].length:0);var j=_.index+p,_=_[0].slice(p),P=j+_.length,N=w.slice(0,j),S=w.slice(P),C=[b,I];N&&(++b,k+=N.length,C.push(N));var E=new s(u,f?n.tokenize(_,f):_,y,_,m);if(C.push(E),S&&C.push(S),Array.prototype.splice.apply(t,C),1!=I&&n.matchGrammar(e,t,r,b,k,!0,u),i)break}else if(i)break}}}}},tokenize:function(e,t){var r=[e],a=t.rest;if(a){for(var l in a)t[l]=a[l];delete t.rest}return n.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){var r=n.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){var r=n.hooks.all[e];if(r&&r.length)for(var a,l=0;a=r[l++];)a(t)}}},r=n.Token=function(e,t,n,r,a){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!a};if(r.stringify=function(e,t,a){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return r.stringify(n,t,e)}).join("");var l={type:e.type,content:r.stringify(e.content,t,a),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:a};if(e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o=Object.keys(l.attributes).map(function(e){return e+'="'+(l.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+l.tag+' class="'+l.classes.join(" ")+'"'+(o?" "+o:"")+">"+l.content+"</"+l.tag+">"},!_self.document)return _self.addEventListener?(n.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),r=t.language,a=t.code,l=t.immediateClose;_self.postMessage(n.highlight(a,n.languages[r],r)),l&&_self.close()},!1),_self.Prism):_self.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(n.filename=a.src,n.manual||a.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
|
4
|
-
Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(?:true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};
|
5
|
-
!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?=end/m,greedy:!0}],keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:n}}]}(Prism);
|
@@ -1,17 +0,0 @@
|
|
1
|
-
var metas = document.getElementsByTagName('meta');
|
2
|
-
var i;
|
3
|
-
if (navigator.userAgent.match(/iPhone/i)) {
|
4
|
-
for (i=0; i<metas.length; i++) {
|
5
|
-
if (metas[i].name == "viewport") {
|
6
|
-
metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";
|
7
|
-
}
|
8
|
-
}
|
9
|
-
document.addEventListener("gesturestart", gestureStart, false);
|
10
|
-
}
|
11
|
-
function gestureStart() {
|
12
|
-
for (i=0; i<metas.length; i++) {
|
13
|
-
if (metas[i].name == "viewport") {
|
14
|
-
metas[i].content = "width=device-width, minimum-scale=0.25, maximum-scale=1.6";
|
15
|
-
}
|
16
|
-
}
|
17
|
-
}
|
data/docs/marketpay.html
DELETED
@@ -1,171 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
6
|
-
<title>Adyen-ruby-api-library by Adyen</title>
|
7
|
-
|
8
|
-
<link rel="stylesheet" href="stylesheets/styles.css">
|
9
|
-
<link rel="stylesheet" href="stylesheets/github-light.css">
|
10
|
-
<meta name="viewport" content="width=device-width">
|
11
|
-
|
12
|
-
<link rel="stylesheet" href="stylesheets/prism.css">
|
13
|
-
<script src="javascripts/prism.js"></script>
|
14
|
-
<!--[if lt IE 9]>
|
15
|
-
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
16
|
-
<![endif]-->
|
17
|
-
</head>
|
18
|
-
<body>
|
19
|
-
<div class="wrapper">
|
20
|
-
<header>
|
21
|
-
<h1>Adyen-ruby-api-library</h1>
|
22
|
-
<p>Adyen API Library for ruby</p>
|
23
|
-
|
24
|
-
<p class="view"><a href="https://github.com/Adyen/adyen-ruby-api-library">View the Project on GitHub <small>Adyen/adyen-ruby-api-library</small></a></p>
|
25
|
-
<ul>
|
26
|
-
<li><a href="https://github.com/Adyen/adyen-ruby-api-library/zipball/main">Download <strong>ZIP File</strong></a></li>
|
27
|
-
<li><a href="https://github.com/Adyen/adyen-ruby-api-library/tarball/main">Download <strong>TAR Ball</strong></a></li>
|
28
|
-
<li><a href="https://github.com/Adyen/adyen-ruby-api-library">View On <strong>GitHub</strong></a></li>
|
29
|
-
</ul>
|
30
|
-
</header>
|
31
|
-
<section>
|
32
|
-
<h2 id="availablemethods">Available methods</h2>
|
33
|
-
|
34
|
-
<h4 id="marketpayaccount">marketpay.account:</h4>
|
35
|
-
|
36
|
-
<ul>
|
37
|
-
<li>create_account_holder</li>
|
38
|
-
|
39
|
-
<li>get_account_holder</li>
|
40
|
-
|
41
|
-
<li>update_account_holder</li>
|
42
|
-
|
43
|
-
<li>update_account_holder_state</li>
|
44
|
-
|
45
|
-
<li>suspend_account_holder</li>
|
46
|
-
|
47
|
-
<li>un_suspend_account_holder</li>
|
48
|
-
|
49
|
-
<li>close_account_holder</li>
|
50
|
-
|
51
|
-
<li>create_account</li>
|
52
|
-
|
53
|
-
<li>update_account</li>
|
54
|
-
|
55
|
-
<li>close_account</li>
|
56
|
-
|
57
|
-
<li>upload_document</li>
|
58
|
-
|
59
|
-
<li>get_uploaded_documents</li>
|
60
|
-
|
61
|
-
<li>delete_bank_accounts</li>
|
62
|
-
|
63
|
-
<li>delete_shareholders</li>
|
64
|
-
|
65
|
-
<li>delete_signatories</li>
|
66
|
-
</ul>
|
67
|
-
|
68
|
-
<h4 id="marketpayfund">marketpay.fund:</h4>
|
69
|
-
|
70
|
-
<ul>
|
71
|
-
<li>account_holder_balance</li>
|
72
|
-
|
73
|
-
<li>account_holder_transaction_list</li>
|
74
|
-
|
75
|
-
<li>payout_account_holder</li>
|
76
|
-
|
77
|
-
<li>transfer_funds</li>
|
78
|
-
|
79
|
-
<li>setup_beneficiary</li>
|
80
|
-
|
81
|
-
<li>refund_not_paid_out_transfers</li>
|
82
|
-
</ul>
|
83
|
-
|
84
|
-
<h4 id="marketpaynotification">marketpay.notification:</h4>
|
85
|
-
|
86
|
-
<ul>
|
87
|
-
<li>create_notification_configuration</li>
|
88
|
-
|
89
|
-
<li>get_notification_configuration</li>
|
90
|
-
|
91
|
-
<li>get_notification_configuration_list</li>
|
92
|
-
|
93
|
-
<li>test_notification_configuration</li>
|
94
|
-
|
95
|
-
<li>update_notification_configuration</li>
|
96
|
-
|
97
|
-
<li>delete_notification_configurations</li>
|
98
|
-
</ul>
|
99
|
-
|
100
|
-
<h2 id="overview">Overview</h2>
|
101
|
-
|
102
|
-
<p>Use Adyen MarketPay to power your marketplace with onboarding, payment processing, and payouts.</p>
|
103
|
-
|
104
|
-
<p>Adyen MarketPay is an end-to-end payment solution for platforms and marketplaces. MarketPay's extensive API powers many types of platforms, such as crowdfunding platforms, peer-to-peer marketplaces, and on-demand services.</p>
|
105
|
-
|
106
|
-
<p>MarketPay enables you to onboard sellers, service providers or contractors as sub-merchants and accept payments on their behalf. You can also split payments, transfer funds, and pay out to sub-merchants.</p>
|
107
|
-
|
108
|
-
<p>From a technical perspective, MarketPay is broken down into 3 separate services:</p>
|
109
|
-
|
110
|
-
<ul>
|
111
|
-
<li>Account</li>
|
112
|
-
|
113
|
-
<li>Fund</li>
|
114
|
-
|
115
|
-
<li>Notification</li>
|
116
|
-
</ul>
|
117
|
-
|
118
|
-
<h2 id="authentication">Authentication</h2>
|
119
|
-
|
120
|
-
<p>MarketPay is authenticated via webservice username and password.</p>
|
121
|
-
|
122
|
-
<pre><code class="ruby language-ruby">adyen.ws_user = "ws@Company.TestCompany"
|
123
|
-
adyen.ws_passord = "super_secure_password123"</code></pre></p>
|
124
|
-
|
125
|
-
<h2 id="account">Account</h2>
|
126
|
-
|
127
|
-
<p>The Account service is used for onboarding and KYC for people on both sides of your marketplace.</p>
|
128
|
-
|
129
|
-
<p>To create an account holder, use the create_account_holder method:</p>
|
130
|
-
|
131
|
-
<pre><code class="ruby language-ruby">response = adyen.marketpay.account('{
|
132
|
-
"accountHolderCode":"GENERATE_CODE", // Your unique ID
|
133
|
-
"accountHolderDetails":{
|
134
|
-
"email":"tim@green.com",
|
135
|
-
"individualDetails":{
|
136
|
-
"name":{
|
137
|
-
"firstName":"Tim",
|
138
|
-
"gender": "MALE",
|
139
|
-
"lastName":"Green"
|
140
|
-
}
|
141
|
-
}
|
142
|
-
},
|
143
|
-
"legalEntity":"Individual"
|
144
|
-
}')</code></pre>
|
145
|
-
|
146
|
-
<p>To enable payouts to an account, send required KYC information and docuemnts to the update_account_holder and upload_documents methods. Required KYC can be found in our docs <a href="https://docs.adyen.com/developers/marketpay/onboarding-and-verification#step2step2enablepayouts">here</a>.</p>
|
147
|
-
|
148
|
-
<p>You can disable / delete account holders in the same way.</p>
|
149
|
-
|
150
|
-
<h2 id="fund">Fund</h2>
|
151
|
-
|
152
|
-
<p>The MarketPay Funding API provides endpoints for managing the funds in MarketPay accounts. These management operations include actions such as the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account.</p>
|
153
|
-
|
154
|
-
<p>For further information on MarketPay fund management, please visit the <a href="https://docs.adyen.com/developers/marketpay/marketpay-overview">MarketPay documentation</a>.</p>
|
155
|
-
|
156
|
-
<h2 id="notification">Notification</h2>
|
157
|
-
|
158
|
-
<p>The Adyen MarketPay system can send you notifications for a set of events during the flow, such as creating new accounts or account holders, performing KYC checks, making payouts, and so on. </p>
|
159
|
-
|
160
|
-
<p>These notifications are sent as webhooks to the corresponding URLs configured on your server. Refer to the <a href="https://docs.adyen.com/developers/marketpay/marketpay-notifications/configure-notifications">Configure notifications</a> section to learn how you can set up and test MarketPay notifications, and to <a href="Receive notifications">Receive notifications</a> to explore notification types and see the examples.</p>
|
161
|
-
|
162
|
-
</section>
|
163
|
-
<footer>
|
164
|
-
<p>This project is maintained by <a href="https://github.com/Adyen">Adyen</a></p>
|
165
|
-
<p><small>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
|
166
|
-
</footer>
|
167
|
-
</div>
|
168
|
-
<script src="javascripts/scale.fix.js"></script>
|
169
|
-
|
170
|
-
</body>
|
171
|
-
</html>
|
data/docs/params.json
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"name":"Adyen-ruby-api-library","tagline":"Adyen API Library for ruby","body":"# Adyen APIs Library for ruby\r\n\r\n## Description ##\r\nThe Adyen API Library for ruby enables you to work with Adyen APIs.\r\n\r\n## Getting Started ##\r\n\r\nMake sure you have an Adyen account. If you don't have this you can request it <a href=\"https://www.adyen.com/home/discover/test-account-signup#form\" target=\"_blank\">here</a>\r\nTo make the automatice testing cases working for your account change the credentials in the config/test.ini file.\r\n\r\n## Beta ##\r\nThis library is in Beta. We're comfortable enough with the stability and features of the library that we want you to build real production applications on it. We are using this Libary in our Magento plugins. We will make an effort to support the public and protected surface of the library and maintain backwards compatibility in the future. While we are still in Beta, we reserve the right to make incompatible changes. If we do remove some functionality (typically because better functionality exists or if the feature proved infeasible), we will release a new version of the application.\r\n\r\n## Documentation ##\r\nhttps://docs.adyen.com/manuals/adyen-apis-library-for-ruby\r\n\r\n## Installation ##\r\nYou can use Composer or simply Download the Release\r\n\r\n## Composer ##\r\n\r\nThe preferred method is via [composer](https://getcomposer.org). Follow the\r\n[installation instructions](https://getcomposer.org/doc/00-intro.md) if you do not already have\r\ncomposer installed.\r\n\r\n\r\nOnce composer is installed, execute the following command in your project root to install this library:\r\n\r\n```sh\r\ncomposer require adyen/ruby-api-library\r\n```\r\n\r\n## Examples ##\r\n\r\nCreate Payment Request on Test:\r\n```ruby\r\n\r\n$client = new \\Adyen\\Client();\r\n$client->setApplicationName(\"Adyen ruby Api Library Example\");\r\n$client->setUsername(\"YOUR USERNAME\");\r\n$client->setPassword(\"YOUR PASSWORD\");\r\n$client->setEnvironment(\\Adyen\\Environment::TEST);\r\n\r\n$service = new Service\\Payment($client);\r\n\r\n$json = '{\r\n \"card\": {\r\n \"number\": \"4111111111111111\",\r\n \"expiryMonth\": \"6\",\r\n \"expiryYear\": \"2016\",\r\n \"cvc\": \"737\",\r\n \"holderName\": \"John Smith\"\r\n },\r\n \"amount\": {\r\n \"value\": 1500,\r\n \"currency\": \"EUR\"\r\n },\r\n \"reference\": \"payment-test\",\r\n \"merchantAccount\": \"YOUR MERCHANT ACCOUNT\"\r\n}';\r\n\r\n$params = json_decode($json, true);\r\n\r\n$result = $service->authorise($params);\r\n\r\n```\r\n\r\nFor CSE use\r\n\r\n```ruby\r\n{\r\n \"amount\": {\r\n \"value\": 1499,\r\n \"currency\": \"GBP\"\r\n },\r\n \"reference\": \"payment-test\",\r\n \"merchantAccount\": \"YOUR MERCHANT ACCOUNT\",\r\n \"additionalData\": {\r\n \"card.encrypted.json\": \"THE ENCRYPTED DATA\"\r\n }\r\n}\r\n```\r\n\r\nRefund example:\r\n\r\n```ruby\r\n\r\n$client = new \\Adyen\\Client();\r\n$client->setApplicationName(\"Adyen ruby Api Library Example\");\r\n$client->setUsername(\"YOUR USERNAME\");\r\n$client->setPassword(\"YOUR PASSWORD\");\r\n$client->setEnvironment(\\Adyen\\Environment::TEST);\r\n\r\n// intialize modification service\r\n$service = new Service\\Modification($client);\r\n\r\n// set the amount you want to refund\r\n$modificationAmount = array('currency' => 'CURRENCY', 'value' => 'VALUE');\r\n\r\n// required are merchantAccount, ModificationAmount(currency,value), reference and originalReference\r\n$params = array(\r\n \"merchantAccount\" => 'YOUR MERCHANT ACCOUNT',\r\n \"modificationAmount\" => $modificationAmount,\r\n \"reference\" => 'YOUR OWN REFERENCE',\r\n \"originalReference\" => 'PSPREFERENCE OF THE PAYMENT YOU WANT TO REFUND'\r\n);\r\n\r\n$result = $service->refund($params);\r\n\r\n// $result['response'] = [refund-received]\r\n\r\n```\r\n\r\n## Tests ##\r\nFor the test cases you need the PCI permission enabled on you account. There are no test cases for CSE because credit card data is encrypted through our javascript library.\r\nBy default the test will then be skipped. If you have these permissions fill in your account details in the config/test.ini file to let the test work.\r\n","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."}
|