-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #375 from mollie/373-payment-resource-updates
373 payment resource updates
- Loading branch information
Showing
4 changed files
with
97 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,46 @@ | |
"value": "10.00", | ||
"currency": "EUR" | ||
}, | ||
"restrictPaymentMethodsToCountry": "NL", | ||
"billingAddress": { | ||
"streetAndNumber": "Keizersgracht 313", | ||
"city": "Amsterdam", | ||
"region": "Noord-Holland", | ||
"postalCode": "1234AB", | ||
"country": "NL", | ||
"title": "Dhr.", | ||
"givenName": "Piet", | ||
"familyName": "Mondriaan", | ||
"email": "[email protected]", | ||
"phone": "+31309202070" | ||
}, | ||
"shippingAddress": { | ||
"streetAndNumber": "Keizersgracht 313", | ||
"streetAdditional": "4th floor", | ||
"city": "Haarlem", | ||
"region": "Noord-Holland", | ||
"postalCode": "5678AB", | ||
"country": "NL", | ||
"title": "Mr.", | ||
"givenName": "Chuck", | ||
"familyName": "Norris", | ||
"email": "[email protected]" | ||
}, | ||
"lines": [ | ||
{ | ||
"type": "physical", | ||
"description": "Product 1", | ||
"quantity": 1, | ||
"unitPrice": { | ||
"value": "2.00", | ||
"currency": "EUR" | ||
}, | ||
"totalAmount": { | ||
"value": "2.00", | ||
"currency": "EUR" | ||
} | ||
} | ||
], | ||
"description": "Order #12345", | ||
"method": "ideal", | ||
"metadata": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,6 +110,45 @@ def test_get_single_payment(client, response): | |
assert payment.capture_mode == "automatic" | ||
assert payment.capture_before == "2023-01-20T09:13:37+00+00" | ||
assert payment.capture_delay == "20 hours" | ||
assert payment.restrict_payment_methods_to_country == "NL" | ||
# lines property | ||
assert payment.lines == [ | ||
{ | ||
"type": "physical", | ||
"description": "Product 1", | ||
"quantity": 1, | ||
"unitPrice": {"value": "2.00", "currency": "EUR"}, | ||
"totalAmount": {"value": "2.00", "currency": "EUR"}, | ||
} | ||
] | ||
# billing_address property | ||
assert payment.billing_address == { | ||
"streetAndNumber": "Keizersgracht 313", | ||
"city": "Amsterdam", | ||
"region": "Noord-Holland", | ||
"postalCode": "1234AB", | ||
"country": "NL", | ||
"title": "Dhr.", | ||
"givenName": "Piet", | ||
"familyName": "Mondriaan", | ||
"email": "[email protected]", | ||
"phone": "+31309202070", | ||
} | ||
|
||
# shipping_address property | ||
assert payment.shipping_address == { | ||
"streetAndNumber": "Keizersgracht 313", | ||
"streetAdditional": "4th floor", | ||
"city": "Haarlem", | ||
"region": "Noord-Holland", | ||
"postalCode": "5678AB", | ||
"country": "NL", | ||
"title": "Mr.", | ||
"givenName": "Chuck", | ||
"familyName": "Norris", | ||
"email": "[email protected]", | ||
} | ||
|
||
# properties from _links | ||
assert payment.checkout_url == "https://www.mollie.com/payscreen/select-method/7UhSN1zuXS" | ||
assert payment.changepaymentstate_url is None | ||
|