stripe-api 0.3.1__tar.gz → 0.3.2__tar.gz
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.
- {stripe-api-0.3.1 → stripe-api-0.3.2}/PKG-INFO +1 -1
- {stripe-api-0.3.1 → stripe-api-0.3.2}/setup.py +1 -1
- {stripe-api-0.3.1 → stripe-api-0.3.2}/src/stripe/intent.py +17 -0
- {stripe-api-0.3.1 → stripe-api-0.3.2}/src/stripe_api.egg-info/PKG-INFO +1 -1
- {stripe-api-0.3.1 → stripe-api-0.3.2}/README.md +0 -0
- {stripe-api-0.3.1 → stripe-api-0.3.2}/setup.cfg +0 -0
- {stripe-api-0.3.1 → stripe-api-0.3.2}/src/stripe/__init__.py +0 -0
- {stripe-api-0.3.1 → stripe-api-0.3.2}/src/stripe/account.py +0 -0
- {stripe-api-0.3.1 → stripe-api-0.3.2}/src/stripe/balance.py +0 -0
- {stripe-api-0.3.1 → stripe-api-0.3.2}/src/stripe/base.py +0 -0
- {stripe-api-0.3.1 → stripe-api-0.3.2}/src/stripe/charge.py +0 -0
- {stripe-api-0.3.1 → stripe-api-0.3.2}/src/stripe/customer.py +0 -0
- {stripe-api-0.3.1 → stripe-api-0.3.2}/src/stripe/secure.py +0 -0
- {stripe-api-0.3.1 → stripe-api-0.3.2}/src/stripe/source.py +0 -0
- {stripe-api-0.3.1 → stripe-api-0.3.2}/src/stripe/token.py +0 -0
- {stripe-api-0.3.1 → stripe-api-0.3.2}/src/stripe_api.egg-info/SOURCES.txt +0 -0
- {stripe-api-0.3.1 → stripe-api-0.3.2}/src/stripe_api.egg-info/dependency_links.txt +0 -0
- {stripe-api-0.3.1 → stripe-api-0.3.2}/src/stripe_api.egg-info/not-zip-safe +0 -0
- {stripe-api-0.3.1 → stripe-api-0.3.2}/src/stripe_api.egg-info/requires.txt +0 -0
- {stripe-api-0.3.1 → stripe-api-0.3.2}/src/stripe_api.egg-info/top_level.txt +0 -0
|
@@ -39,9 +39,11 @@ class IntentAPI(object):
|
|
|
39
39
|
capture_method=None,
|
|
40
40
|
confirm=None,
|
|
41
41
|
description=None,
|
|
42
|
+
automatic_payment_methods=None,
|
|
42
43
|
three_d_secure=None,
|
|
43
44
|
return_url=None,
|
|
44
45
|
payment_method_types=[],
|
|
46
|
+
payment_method_options={},
|
|
45
47
|
metadata={},
|
|
46
48
|
):
|
|
47
49
|
url = self.base_url + "payment_intents"
|
|
@@ -54,6 +56,10 @@ class IntentAPI(object):
|
|
|
54
56
|
params["confirm"] = confirm
|
|
55
57
|
if description:
|
|
56
58
|
params["description"] = description
|
|
59
|
+
if not automatic_payment_methods == None:
|
|
60
|
+
params["automatic_payment_methods[enabled]"] = (
|
|
61
|
+
"true" if automatic_payment_methods else "false"
|
|
62
|
+
)
|
|
57
63
|
if three_d_secure:
|
|
58
64
|
params["payment_method_options[card][request_three_d_secure]"] = (
|
|
59
65
|
three_d_secure
|
|
@@ -62,6 +68,9 @@ class IntentAPI(object):
|
|
|
62
68
|
params["return_url"] = return_url
|
|
63
69
|
for payment_method_type in payment_method_types:
|
|
64
70
|
params["payment_method_types[]"] = payment_method_type
|
|
71
|
+
for key, value in payment_method_options.items():
|
|
72
|
+
for _key, _value in value.items():
|
|
73
|
+
params["payment_method_options[" + key + "][" + _key + "]"] = _value
|
|
65
74
|
for key, value in metadata.items():
|
|
66
75
|
params["metadata[" + key + "]"] = value
|
|
67
76
|
contents = self.post(url, params=params)
|
|
@@ -71,3 +80,11 @@ class IntentAPI(object):
|
|
|
71
80
|
url = self.base_url + "payment_intents/%s/capture" % identifier
|
|
72
81
|
contents = self.post(url)
|
|
73
82
|
return contents
|
|
83
|
+
|
|
84
|
+
def confirm_intent(self, identifier, return_url=None):
|
|
85
|
+
url = self.base_url + "payment_intents/%s/confirm" % identifier
|
|
86
|
+
params = {}
|
|
87
|
+
if return_url:
|
|
88
|
+
params["return_url"] = return_url
|
|
89
|
+
contents = self.post(url, params=params)
|
|
90
|
+
return contents
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|