adyen-ruby-api-library 11.3.0 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +2 -2
- data/Gemfile +2 -2
- data/README.md +30 -7
- data/VERSION +1 -1
- data/adyen-ruby-api-library.gemspec +1 -1
- data/lib/adyen/client.rb +6 -11
- data/lib/adyen/deprecation.rb +34 -0
- data/lib/adyen/services/balanceControl/balance_control_api.rb +2 -0
- data/lib/adyen/services/balancePlatform/balance_accounts_api.rb +0 -40
- data/lib/adyen/services/balancePlatform/custom_payout_schedules_sweeps_api.rb +56 -0
- data/lib/adyen/services/balancePlatform/grant_accounts_api.rb +2 -0
- data/lib/adyen/services/balancePlatform/grant_offers_api.rb +4 -0
- data/lib/adyen/services/balancePlatform/managed_payout_schedules_api.rb +80 -0
- data/lib/adyen/services/balancePlatform/recurring_top_ups_api.rb +48 -0
- data/lib/adyen/services/balancePlatform/sca_device_management_api.rb +8 -0
- data/lib/adyen/services/balancePlatform.rb +15 -0
- data/lib/adyen/services/checkout/payments_api.rb +8 -0
- data/lib/adyen/services/checkout/utility_api.rb +2 -0
- data/lib/adyen/services/checkout.rb +1 -1
- data/lib/adyen/services/management/donation_campaigns_api.rb +64 -0
- data/lib/adyen/services/management.rb +5 -0
- data/lib/adyen/services/payment/modifications_api.rb +2 -0
- data/lib/adyen/services/posMobile/pos_mobile_api.rb +5 -0
- data/lib/adyen/services/posTerminalManagement.rb +10 -0
- data/lib/adyen/services/recurring/recurring_api.rb +4 -0
- data/lib/adyen/services/service.rb +2 -0
- data/lib/adyen/services/transfers/capital_api.rb +6 -0
- data/lib/adyen/services/transfers/cash_out_api.rb +24 -0
- data/lib/adyen/services/transfers.rb +5 -0
- data/lib/adyen/utils/hmac_validator.rb +15 -17
- data/lib/adyen/version.rb +1 -1
- data/sdk-generation-log/balanceplatform.json +4 -4
- data/sdk-generation-log/checkout.json +4 -4
- data/sdk-generation-log/management.json +4 -4
- data/sdk-generation-log/posmobile.json +4 -4
- data/sdk-generation-log/transfers.json +4 -4
- data/spec/balance_control_spec.rb +41 -0
- data/spec/balance_platform_spec.rb +498 -4
- data/spec/checkout-oauth_spec.rb +220 -10
- data/spec/checkout_spec.rb +245 -10
- data/spec/client_spec.rb +1 -5
- data/spec/deprecation_spec.rb +112 -0
- data/spec/management_spec.rb +184 -0
- data/spec/mocks/requests/BalancePlatform/apply_managed_schedule.json +14 -0
- data/spec/mocks/requests/BalancePlatform/begin_sca_device_registration.json +4 -0
- data/spec/mocks/requests/BalancePlatform/create_recurring_top_up.json +21 -0
- data/spec/mocks/requests/BalancePlatform/create_sweep.json +10 -0
- data/spec/mocks/requests/BalancePlatform/finish_sca_device_registration.json +3 -0
- data/spec/mocks/requests/BalancePlatform/submit_sca_association.json +8 -0
- data/spec/mocks/requests/BalancePlatform/update_balance_account_managed_schedule.json +5 -0
- data/spec/mocks/requests/BalancePlatform/update_recurring_top_ups.json +3 -0
- data/spec/mocks/requests/BalancePlatform/update_sweep.json +6 -0
- data/spec/mocks/requests/Checkout/amount_updates.json +1 -1
- data/spec/mocks/requests/Checkout/card_details.json +3 -0
- data/spec/mocks/requests/Checkout/create_stored_payment_method.json +10 -0
- data/spec/mocks/requests/Checkout/donation_campaigns.json +4 -0
- data/spec/mocks/requests/Checkout/donations.json +9 -0
- data/spec/mocks/requests/Checkout/orders.json +5 -3
- data/spec/mocks/requests/Checkout/payment-details.json +2 -14
- data/spec/mocks/requests/Checkout/payment_methods_balance.json +5 -2
- data/spec/mocks/requests/Checkout/payments.json +9 -10
- data/spec/mocks/requests/Checkout/paypal_update_order.json +5 -0
- data/spec/mocks/requests/Checkout/reversals.json +3 -0
- data/spec/mocks/requests/Checkout/update_session.json +7 -0
- data/spec/mocks/requests/Management/create_donation_campaign.json +7 -0
- data/spec/mocks/requests/Management/list_nonprofits.json +5 -0
- data/spec/mocks/requests/Management/update_donation_campaign.json +6 -0
- data/spec/mocks/requests/Transfers/initiate_cashout.json +12 -0
- data/spec/mocks/responses/BalancePlatform/apply_managed_schedule.json +17 -0
- data/spec/mocks/responses/BalancePlatform/begin_sca_device_registration.json +8 -0
- data/spec/mocks/responses/BalancePlatform/create_recurring_top_up.json +23 -0
- data/spec/mocks/responses/BalancePlatform/create_sweep.json +12 -0
- data/spec/mocks/responses/BalancePlatform/finish_sca_device_registration.json +7 -0
- data/spec/mocks/responses/BalancePlatform/get_all_sweeps_for_balance_account.json +31 -0
- data/spec/mocks/responses/BalancePlatform/get_balance_account_managed_schedule_by_id.json +17 -0
- data/spec/mocks/responses/BalancePlatform/get_balance_account_managed_schedules.json +26 -0
- data/spec/mocks/responses/BalancePlatform/get_balance_platform_managed_schedule_by_id.json +27 -0
- data/spec/mocks/responses/BalancePlatform/get_balance_platform_managed_schedules.json +31 -0
- data/spec/mocks/responses/BalancePlatform/get_payout_schedule_executions.json +21 -0
- data/spec/mocks/responses/BalancePlatform/get_recurring_top_ups.json +35 -0
- data/spec/mocks/responses/BalancePlatform/get_sweep.json +12 -0
- data/spec/mocks/responses/BalancePlatform/submit_sca_association.json +10 -0
- data/spec/mocks/responses/BalancePlatform/update_balance_account_managed_schedule.json +18 -0
- data/spec/mocks/responses/BalancePlatform/update_recurring_top_ups.json +23 -0
- data/spec/mocks/responses/BalancePlatform/update_sweep.json +12 -0
- data/spec/mocks/responses/Checkout/amount_updates.json +1 -1
- data/spec/mocks/responses/Checkout/card_details.json +5 -0
- data/spec/mocks/responses/Checkout/create_stored_payment_method.json +5 -0
- data/spec/mocks/responses/Checkout/donation_campaigns.json +1 -0
- data/spec/mocks/responses/Checkout/donations.json +5 -0
- data/spec/mocks/responses/Checkout/orders.json +6 -1
- data/spec/mocks/responses/Checkout/orders_cancel.json +1 -1
- data/spec/mocks/responses/Checkout/payment-details.json +2 -13
- data/spec/mocks/responses/Checkout/payment_links.json +3 -0
- data/spec/mocks/responses/Checkout/payment_methods.json +2 -2
- data/spec/mocks/responses/Checkout/payment_methods_balance.json +5 -1
- data/spec/mocks/responses/Checkout/payments.json +4 -94
- data/spec/mocks/responses/Checkout/paypal_update_order.json +4 -0
- data/spec/mocks/responses/Checkout/reversals.json +6 -0
- data/spec/mocks/responses/Checkout/update_session.json +3 -0
- data/spec/mocks/responses/Management/donation_campaign.json +13 -0
- data/spec/mocks/responses/Management/list_donation_campaigns.json +19 -0
- data/spec/mocks/responses/Management/list_nonprofits.json +34 -0
- data/spec/mocks/responses/Transfers/initiate_cashout.json +31 -0
- data/spec/spec_helper.rb +2 -2
- data/spec/transfers_spec.rb +28 -0
- data/spec/utils/consumer_smoke.rb +23 -0
- data/spec/utils/hmac_validator_spec.rb +55 -0
- data/templates/api-small.mustache +4 -2
- data/templates/api.mustache +4 -2
- metadata +58 -2
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hasNext": false,
|
|
3
|
+
"hasPrevious": false,
|
|
4
|
+
"sweeps": [
|
|
5
|
+
{
|
|
6
|
+
"counterparty": {
|
|
7
|
+
"balanceAccountId": "BA3227C223222B5BLP6JQC3FD"
|
|
8
|
+
},
|
|
9
|
+
"currency": "EUR",
|
|
10
|
+
"id": "SWEP00000000000000000000000001",
|
|
11
|
+
"schedule": {
|
|
12
|
+
"type": "daily"
|
|
13
|
+
},
|
|
14
|
+
"status": "active",
|
|
15
|
+
"type": "push"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"counterparty": {
|
|
19
|
+
"transferInstrumentId": "SE322JV222224D5FJ7QTZ9HVM"
|
|
20
|
+
},
|
|
21
|
+
"currency": "EUR",
|
|
22
|
+
"id": "SWEP00000000000000000000000002",
|
|
23
|
+
"schedule": {
|
|
24
|
+
"type": "cron",
|
|
25
|
+
"cronExpression": "30 17 * * MON"
|
|
26
|
+
},
|
|
27
|
+
"status": "inactive",
|
|
28
|
+
"type": "pull"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "PSAC00000000000000000000000001",
|
|
3
|
+
"balancePlatformPayoutScheduleId": "PSPC00000000000000000000000001",
|
|
4
|
+
"balanceAccountId": "BA000000000000000000001",
|
|
5
|
+
"transferInstrumentId": "SE00000000000000000000001",
|
|
6
|
+
"currency": "EUR",
|
|
7
|
+
"reference": "Monthly payout",
|
|
8
|
+
"description": "Scheduled payout to merchant bank account",
|
|
9
|
+
"referenceForBeneficiary": "PAYOUT-REF-001",
|
|
10
|
+
"retainedAmount": 10000,
|
|
11
|
+
"minPayoutAmount": 1000,
|
|
12
|
+
"maxPayoutAmount": 100000000,
|
|
13
|
+
"createdAt": "2024-01-15T10:30:00Z",
|
|
14
|
+
"enabled": true,
|
|
15
|
+
"frequency": "monthly",
|
|
16
|
+
"frequencyValue": 1
|
|
17
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"balanceAccountPayoutSchedules": [
|
|
3
|
+
{
|
|
4
|
+
"id": "PSAC00000000000000000000000001",
|
|
5
|
+
"balancePlatformPayoutScheduleId": "PSPC00000000000000000000000001",
|
|
6
|
+
"balanceAccountId": "BA000000000000000000001",
|
|
7
|
+
"transferInstrumentId": "SE00000000000000000000001",
|
|
8
|
+
"currency": "EUR",
|
|
9
|
+
"reference": "Monthly payout",
|
|
10
|
+
"description": "Scheduled payout to merchant bank account",
|
|
11
|
+
"referenceForBeneficiary": "PAYOUT-REF-001",
|
|
12
|
+
"retainedAmount": 10000,
|
|
13
|
+
"minPayoutAmount": 1000,
|
|
14
|
+
"maxPayoutAmount": 100000000,
|
|
15
|
+
"createdAt": "2024-01-15T10:30:00Z",
|
|
16
|
+
"enabled": true,
|
|
17
|
+
"frequency": "monthly",
|
|
18
|
+
"frequencyValue": 1
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"link": {
|
|
22
|
+
"self": {
|
|
23
|
+
"href": "https://balanceplatform-api-test.adyen.com/bcl/v2/balanceAccounts/BA000000000000000000001/payoutSchedules"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "PSPC00000000000000000000000001",
|
|
3
|
+
"balancePlatformId": "YOUR_BALANCE_PLATFORM_ID",
|
|
4
|
+
"countryCode": "NL",
|
|
5
|
+
"currency": "EUR",
|
|
6
|
+
"defaultDescription": "Scheduled payout to merchant bank account",
|
|
7
|
+
"defaultFrequency": "monthly",
|
|
8
|
+
"defaultFrequencyValue": 1,
|
|
9
|
+
"defaultReference": "Monthly payout",
|
|
10
|
+
"defaultReferenceForBeneficiary": "PAYOUT-REF-001",
|
|
11
|
+
"automaticApplication": false,
|
|
12
|
+
"enabled": true,
|
|
13
|
+
"maxPayoutAmount": 100000000,
|
|
14
|
+
"minPayoutAmount": 1000,
|
|
15
|
+
"retainedAmount": 10000,
|
|
16
|
+
"payoutScheduleDescription": "Standard",
|
|
17
|
+
"userSettlementDelay": 2,
|
|
18
|
+
"userSettlementTime": {
|
|
19
|
+
"hour": 8,
|
|
20
|
+
"minute": 0,
|
|
21
|
+
"second": 0,
|
|
22
|
+
"nano": 0
|
|
23
|
+
},
|
|
24
|
+
"userSettlementTimeZone": "Europe/Amsterdam",
|
|
25
|
+
"createdAt": "2024-01-15T10:30:00Z",
|
|
26
|
+
"updatedAt": "2024-01-16T14:00:00Z"
|
|
27
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"balancePlatformPayoutSchedules": [
|
|
3
|
+
{
|
|
4
|
+
"id": "PSPC00000000000000000000000001",
|
|
5
|
+
"balancePlatformId": "YOUR_BALANCE_PLATFORM_ID",
|
|
6
|
+
"countryCode": "NL",
|
|
7
|
+
"currency": "EUR",
|
|
8
|
+
"defaultDescription": "Scheduled payout to merchant bank account",
|
|
9
|
+
"defaultFrequency": "monthly",
|
|
10
|
+
"defaultFrequencyValue": 1,
|
|
11
|
+
"defaultReference": "Monthly payout",
|
|
12
|
+
"defaultReferenceForBeneficiary": "PAYOUT-REF-001",
|
|
13
|
+
"automaticApplication": false,
|
|
14
|
+
"enabled": true,
|
|
15
|
+
"maxPayoutAmount": 100000000,
|
|
16
|
+
"minPayoutAmount": 1000,
|
|
17
|
+
"retainedAmount": 10000,
|
|
18
|
+
"payoutScheduleDescription": "Standard",
|
|
19
|
+
"userSettlementDelay": 2,
|
|
20
|
+
"userSettlementTime": {
|
|
21
|
+
"hour": 8,
|
|
22
|
+
"minute": 0,
|
|
23
|
+
"second": 0,
|
|
24
|
+
"nano": 0
|
|
25
|
+
},
|
|
26
|
+
"userSettlementTimeZone": "Europe/Amsterdam",
|
|
27
|
+
"createdAt": "2024-01-15T10:30:00Z",
|
|
28
|
+
"updatedAt": "2024-01-16T14:00:00Z"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"payoutScheduleExecutions": [
|
|
3
|
+
{
|
|
4
|
+
"id": "PS0000000000001",
|
|
5
|
+
"result": "skipped",
|
|
6
|
+
"triggeredAt": "2026-03-11T08:00:00Z",
|
|
7
|
+
"resultDetails": {
|
|
8
|
+
"reasonCode": "noBalanceToPayOut",
|
|
9
|
+
"reason": "No balance to pay out"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"id": "PS0000000000002",
|
|
14
|
+
"result": "succeeded",
|
|
15
|
+
"triggeredAt": "2026-03-12T08:00:00Z",
|
|
16
|
+
"resultDetails": {
|
|
17
|
+
"transferId": "A0A0A0A0A0A0A0A0"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"recurringTopUps": [
|
|
3
|
+
{
|
|
4
|
+
"id": "TUPC0000000000000000000001",
|
|
5
|
+
"counterparty": {
|
|
6
|
+
"transferInstrumentId": "SE000000000000000000000001"
|
|
7
|
+
},
|
|
8
|
+
"description": "My description",
|
|
9
|
+
"topUpAmount": {
|
|
10
|
+
"fixed": {
|
|
11
|
+
"value": 1000,
|
|
12
|
+
"currency": "EUR"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"trigger": {
|
|
16
|
+
"schedule": {
|
|
17
|
+
"type": "weekdays"
|
|
18
|
+
},
|
|
19
|
+
"threshold": {
|
|
20
|
+
"value": 100,
|
|
21
|
+
"currency": "EUR"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"status": "active"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"link": {
|
|
28
|
+
"next": {
|
|
29
|
+
"href": "/balanceAccounts/balanceAccount1/recurringTopUps?limit=10&cursor=nextCursorToken"
|
|
30
|
+
},
|
|
31
|
+
"previous": {
|
|
32
|
+
"href": "/balanceAccounts/balanceAccount1/recurringTopUps?limit=10&cursor=previousCursorToken"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "PSAC00000000000000000000000001",
|
|
3
|
+
"balancePlatformPayoutScheduleId": "PSPC00000000000000000000000001",
|
|
4
|
+
"balanceAccountId": "BA000000000000000000001",
|
|
5
|
+
"transferInstrumentId": "SE00000000000000000000001",
|
|
6
|
+
"currency": "EUR",
|
|
7
|
+
"reference": "Monthly payout",
|
|
8
|
+
"description": "Updated payout description",
|
|
9
|
+
"referenceForBeneficiary": "PAYOUT-REF-001",
|
|
10
|
+
"retainedAmount": 20000,
|
|
11
|
+
"minPayoutAmount": 1000,
|
|
12
|
+
"maxPayoutAmount": 100000000,
|
|
13
|
+
"createdAt": "2024-01-15T10:30:00Z",
|
|
14
|
+
"updatedAt": "2024-01-16T14:00:00Z",
|
|
15
|
+
"enabled": false,
|
|
16
|
+
"frequency": "monthly",
|
|
17
|
+
"frequencyValue": 1
|
|
18
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "TUPC0000000000000000000001",
|
|
3
|
+
"counterparty": {
|
|
4
|
+
"transferInstrumentId": "SE000000000000000000000001"
|
|
5
|
+
},
|
|
6
|
+
"description": "new description",
|
|
7
|
+
"topUpAmount": {
|
|
8
|
+
"fixed": {
|
|
9
|
+
"value": 1000,
|
|
10
|
+
"currency": "EUR"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"trigger": {
|
|
14
|
+
"schedule": {
|
|
15
|
+
"type": "weekdays"
|
|
16
|
+
},
|
|
17
|
+
"threshold": {
|
|
18
|
+
"value": 100,
|
|
19
|
+
"currency": "EUR"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"status": "inactive"
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -1,14 +1,3 @@
|
|
|
1
1
|
{
|
|
2
|
-
"resultCode": "RedirectShopper"
|
|
3
|
-
|
|
4
|
-
{
|
|
5
|
-
"key": "returnUrlQueryString",
|
|
6
|
-
"type": "text"
|
|
7
|
-
}
|
|
8
|
-
],
|
|
9
|
-
"paymentData": "Ab02b4c0!BQABAgCZ5wU8Xzylbj3tQI9zZtbOmutq5gON3jF0JOVL9VXTcQ70LkB8UzJZ2EuJiURbwNSpyfMnNNR9ecDBq0Ai+Cu97eUP6/wc51Gh2VClWKILA3fpetixy8rcEd1dHVT9Exa77zg0LuY6qXz/5GIIH62y9CnmKJH4a4KZVQwFu9VYtPnsC8p6Bby2BuByD/VSa3noZDBVuapvWL7+8P6QaPgkFgoWYnzT8uzdoCio+gTNEYivlxhuQj5qa+eyQCrzZDXAvl+1a1z7O3BOOC7yPT0VDd8zNnyxKk9lyax75FUCRYl1BNCP1CGGDzHfvsS8C4FhXPixhZ4Lb1pYajLpKXNqfiRqU4DXn6bAkdnoQ5X8TvD3HqgHos4OLY93qq7j3ai+zeS/hWkZrd0SM+br3G+kCPmzMcBYdIqJLecJcVUUWHUNfdYIl6tmzNDbeedqSXVkyX+w7R/bM3hHppQyFpy2UM6BHalSaIc2oqR2wLQeObOlV9VML2yAvUzIK6OsFdnCtjK+aQsYwBvKMHkgsukvJiEvfwkLzrwxJQWRvYQtVV7ITcSz98tKZmxUFdke8Hca+ySTbqq9OvjGCK+T7FLhaKYGSECcwwKCCKMneTW7S/8Y+qpw2WRBx2Bhho8ZfIwsnq2Nll+QbaOJEiC0PG3NokYhcrKVhXiFFkYYnzNI9hAnjkefE+5rR5dWWWM8Q8h7AEp7ImtleSI6IkFGMEFBQTEwM0NBNTM3RUFFRDg3QzI0REQ1MzkwOUI4MEE3OEE5MjNFMzgyM0Q2OERBQ0M5NEI5RkY4MzA1REMifbA560uFihRRe//z0I3kVj3lZxHTKJZgPZUDraWMQfkMjM7KKXPwyCXyThFp1bFYMmebpxYvbqErFky66og24VCmvNKiZnf1uPJi5OsK9t6QJU1vhC0/QzeCu1TQLUEyUWrelX0V+iO+933RFUzSv78BLNO/bt5JMFIKQoLP6J4CW+bHk+fWrBn4PhbZ5z/ezu23OHoDvg6Pvk1kjxps8FAbHoSB35b+HvOUDtph/usiBWBCgLQVtkbR7C2ImDd4HRh3QvkgjXgbRGGIBBc+jPM9TMYytNlAhB32jktviPASz9+v073N417onB0pcS0Bp2iFTpmsMjWcSbctbj65JTiBIwY6egGrD9ona/oEb+/oppiz4KzS2sJKvtOPg+Jxn2UNssc0dg8gZhV1dxfSqDNonsfxl0vwKoeG99FjyrfgFQvYNlqjn3/WNacjFtCOrBafIQJk95TnkBdpzuqtvqQyIZeq7PbRuTNIb1AQBTmKNmuZMd+gO95sIvhbE1XgO2InIQKCpw0q0Hbw9Nzowm6w1gbSKnabGZhb8SOM+lJ37dNTsNIB/5Eo36kijladqVt5RYGMHLkQa6vxjhfuYPfHYzO5MX4i0ml8rstB5D5sfLqvY3Igzc6RnDhpX5kxVIFAhuPxkTeKFTpCXmnHJwilCY9pZTzVlJp6kOWnk1JlalrzmI3iU6Zhz3ICLNQ+Ub/HEnombi31lZWHnUmhwGKxKg==",
|
|
10
|
-
"redirect": {
|
|
11
|
-
"method": "GET",
|
|
12
|
-
"url": "https://test.adyen.com/hpp/redirectIdeal.shtml?brandCode=ideal¤cyCode=USD&merchantAccount=ColinRood&merchantReference=PM+Checkout+Payment&merchantSig=MKOR8NMs6190maY8sPDCMgOHNIscN356EIhUxSnpDsw%3D&paymentAmount=1000&resURL=https%3A%2F%2Fcheckoutshopper-test.adyen.com%2Fcheckoutshopper%2Fservices%2FPaymentIncomingRedirect%2Fv1%2FlocalPaymentMethod%3FreturnURL%3D&sessionValidity=2018-03-02T18%3A05%3A42Z&skinCode=pub.v2.8115054323780109.7FDNnCDyDJG8hRqbIjU3AQHvyBRuRoNFYHQWgmX4lAU"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
2
|
+
"resultCode": "RedirectShopper"
|
|
3
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"paymentMethods": [
|
|
3
3
|
{
|
|
4
|
-
"
|
|
4
|
+
"inputDetails": [
|
|
5
5
|
{
|
|
6
6
|
"key": "additionalData.card.encrypted.json",
|
|
7
7
|
"type": "cardToken"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"type": "scheme"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
|
-
"
|
|
14
|
+
"inputDetails": [
|
|
15
15
|
{
|
|
16
16
|
"items": [
|
|
17
17
|
{
|
|
@@ -1,95 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"avsResult": "4 AVS not supported for this card type",
|
|
7
|
-
"cardHolderName": "Holder",
|
|
8
|
-
"cardSummary": "1111",
|
|
9
|
-
"fraudManualReview": "false",
|
|
10
|
-
"threeDOffered": "true",
|
|
11
|
-
"refusalReasonRaw": "AUTHORISED",
|
|
12
|
-
"expiryDate": "8/2018",
|
|
13
|
-
"cvcResult": "1 Matches",
|
|
14
|
-
"cardBin": "411111",
|
|
15
|
-
"avsResultRaw": "4",
|
|
16
|
-
"threeDAuthenticated": "false",
|
|
17
|
-
"paymentMethod": "visa",
|
|
18
|
-
"cvcResultRaw": "1",
|
|
19
|
-
"acquirerCode": "TestPmmAcquirer",
|
|
20
|
-
"acquirerReference": "7F59FSE1M6K"
|
|
21
|
-
},
|
|
22
|
-
"fraudResult": {
|
|
23
|
-
"accountScore": 25,
|
|
24
|
-
"results": [{
|
|
25
|
-
"FraudCheckResult": {
|
|
26
|
-
"accountScore": 8,
|
|
27
|
-
"checkId": 2,
|
|
28
|
-
"name": "CardChunkUsage"
|
|
29
|
-
}
|
|
30
|
-
}, {
|
|
31
|
-
"FraudCheckResult": {
|
|
32
|
-
"accountScore": 5,
|
|
33
|
-
"checkId": 3,
|
|
34
|
-
"name": "PaymentDetailUsage"
|
|
35
|
-
}
|
|
36
|
-
}, {
|
|
37
|
-
"FraudCheckResult": {
|
|
38
|
-
"accountScore": 12,
|
|
39
|
-
"checkId": 4,
|
|
40
|
-
"name": "HolderNameUsage"
|
|
41
|
-
}
|
|
42
|
-
}, {
|
|
43
|
-
"FraudCheckResult": {
|
|
44
|
-
"accountScore": 0,
|
|
45
|
-
"checkId": 1,
|
|
46
|
-
"name": "PaymentDetailRefCheck"
|
|
47
|
-
}
|
|
48
|
-
}, {
|
|
49
|
-
"FraudCheckResult": {
|
|
50
|
-
"accountScore": 0,
|
|
51
|
-
"checkId": 13,
|
|
52
|
-
"name": "IssuerRefCheck"
|
|
53
|
-
}
|
|
54
|
-
}, {
|
|
55
|
-
"FraudCheckResult": {
|
|
56
|
-
"accountScore": 0,
|
|
57
|
-
"checkId": 15,
|
|
58
|
-
"name": "IssuingCountryReferral"
|
|
59
|
-
}
|
|
60
|
-
}, {
|
|
61
|
-
"FraudCheckResult": {
|
|
62
|
-
"accountScore": 0,
|
|
63
|
-
"checkId": 27,
|
|
64
|
-
"name": "PmOwnerRefCheck"
|
|
65
|
-
}
|
|
66
|
-
}, {
|
|
67
|
-
"FraudCheckResult": {
|
|
68
|
-
"accountScore": 0,
|
|
69
|
-
"checkId": 41,
|
|
70
|
-
"name": "PaymentDetailNonFraudRefCheck"
|
|
71
|
-
}
|
|
72
|
-
}, {
|
|
73
|
-
"FraudCheckResult": {
|
|
74
|
-
"accountScore": 0,
|
|
75
|
-
"checkId": 10,
|
|
76
|
-
"name": "HolderNameContainsNumber"
|
|
77
|
-
}
|
|
78
|
-
}, {
|
|
79
|
-
"FraudCheckResult": {
|
|
80
|
-
"accountScore": 0,
|
|
81
|
-
"checkId": 11,
|
|
82
|
-
"name": "HolderNameIsOneWord"
|
|
83
|
-
}
|
|
84
|
-
}, {
|
|
85
|
-
"FraudCheckResult": {
|
|
86
|
-
"accountScore": 0,
|
|
87
|
-
"checkId": 25,
|
|
88
|
-
"name": "CVCAuthResultCheck"
|
|
89
|
-
}
|
|
90
|
-
}]
|
|
91
|
-
},
|
|
92
|
-
"pspReference": "7924835492819808",
|
|
93
|
-
"resultCode": "Authorised",
|
|
94
|
-
"authCode": "69746"
|
|
95
|
-
}
|
|
2
|
+
"merchantReference": "YOUR_REFERENCE_0001",
|
|
3
|
+
"pspReference": "8512345678901234",
|
|
4
|
+
"resultCode": "Authorised"
|
|
5
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "DC3227C223222B5BLP6JQC3FD",
|
|
3
|
+
"name": "Spring fundraiser",
|
|
4
|
+
"status": "inactive",
|
|
5
|
+
"nonprofitCause": {
|
|
6
|
+
"causeId": "CA3227C223222B5BLP6JQC3FD",
|
|
7
|
+
"nonprofitName": "Example Nonprofit",
|
|
8
|
+
"description": "An example nonprofit cause."
|
|
9
|
+
},
|
|
10
|
+
"accountHolderIds": [
|
|
11
|
+
"AH3227C223222B5BLP6JQC3FD"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"itemsTotal": 1,
|
|
3
|
+
"pagesTotal": 1,
|
|
4
|
+
"campaigns": [
|
|
5
|
+
{
|
|
6
|
+
"id": "DC3227C223222B5BLP6JQC3FD",
|
|
7
|
+
"name": "Spring fundraiser",
|
|
8
|
+
"status": "active",
|
|
9
|
+
"nonprofitCause": {
|
|
10
|
+
"causeId": "CA3227C223222B5BLP6JQC3FD",
|
|
11
|
+
"nonprofitName": "Example Nonprofit",
|
|
12
|
+
"description": "An example nonprofit cause."
|
|
13
|
+
},
|
|
14
|
+
"accountHolderIds": [
|
|
15
|
+
"AH3227C223222B5BLP6JQC3FD"
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"itemsTotal": 1,
|
|
3
|
+
"pagesTotal": 1,
|
|
4
|
+
"nonprofits": [
|
|
5
|
+
{
|
|
6
|
+
"id": "NP3227C223222B5BLP6JQC3FD",
|
|
7
|
+
"name": "Example Nonprofit",
|
|
8
|
+
"description": "An example nonprofit organization.",
|
|
9
|
+
"logoUrl": "https://example.org/logo.png",
|
|
10
|
+
"website": "https://example.org",
|
|
11
|
+
"termsAndConditionsUrl": "https://example.org/terms",
|
|
12
|
+
"goals": [
|
|
13
|
+
"unsdg_1"
|
|
14
|
+
],
|
|
15
|
+
"locales": [
|
|
16
|
+
"en-US"
|
|
17
|
+
],
|
|
18
|
+
"regions": [
|
|
19
|
+
"US"
|
|
20
|
+
],
|
|
21
|
+
"causes": [
|
|
22
|
+
{
|
|
23
|
+
"id": "CA3227C223222B5BLP6JQC3FD",
|
|
24
|
+
"name": "Example Cause",
|
|
25
|
+
"description": "An example cause.",
|
|
26
|
+
"bannerUrl": "https://example.org/banner.png",
|
|
27
|
+
"locales": [
|
|
28
|
+
"en-US"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "1W1UG35U8A9J5ZLG",
|
|
3
|
+
"amount": {
|
|
4
|
+
"value": 110000,
|
|
5
|
+
"currency": "EUR"
|
|
6
|
+
},
|
|
7
|
+
"instructingBalanceAccountId": "BAB8B2C3D4E5F6G7H8D9J6GD4",
|
|
8
|
+
"counterparty": {
|
|
9
|
+
"transferInstrumentId": "SE000JVZ7Q8D2ZJ4VZ0J"
|
|
10
|
+
},
|
|
11
|
+
"referenceForBeneficiary": "Your-reference-sent-to-the-beneficiary",
|
|
12
|
+
"description": "Your description for the cashout",
|
|
13
|
+
"transfers": [
|
|
14
|
+
{
|
|
15
|
+
"id": "400F6060JMB1I0AB",
|
|
16
|
+
"type": "cashoutRepayment",
|
|
17
|
+
"amount": {
|
|
18
|
+
"currency": "EUR",
|
|
19
|
+
"value": 50500
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "400F6060JMB1I0AA",
|
|
24
|
+
"type": "cashoutFee",
|
|
25
|
+
"amount": {
|
|
26
|
+
"currency": "EUR",
|
|
27
|
+
"value": 500
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
data/spec/spec_helper.rb
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
# rubocop:disable Metrics/AbcSize
|
|
3
3
|
|
|
4
4
|
require 'webmock/rspec'
|
|
5
|
-
require 'base64'
|
|
6
5
|
require_relative '../lib/adyen-ruby-api-library'
|
|
7
6
|
|
|
8
7
|
# disable external connections
|
|
@@ -32,7 +31,8 @@ def create_test(client, service, method_name, parent_object)
|
|
|
32
31
|
elsif !client.oauth_token.nil?
|
|
33
32
|
headers["Authorization"] = "Bearer #{client.oauth_token}"
|
|
34
33
|
elsif !client.ws_user.nil? && !client.ws_password.nil?
|
|
35
|
-
|
|
34
|
+
# Base64 encoding
|
|
35
|
+
auth_header = "Basic #{["#{client.ws_user}:#{client.ws_password}"].pack('m')}"
|
|
36
36
|
headers['Authorization'] = auth_header.strip
|
|
37
37
|
else
|
|
38
38
|
raise ArgumentError, 'Authentication not set correctly in test case'
|