stripe-api 0.3.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: stripe-api
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: Stripe API Client
5
5
  Home-page: http://stripe-api.hive.pt
6
6
  Author: Hive Solutions Lda.
@@ -38,4 +38,10 @@ Classifier: Programming Language :: Python :: 3.4
38
38
  Classifier: Programming Language :: Python :: 3.5
39
39
  Classifier: Programming Language :: Python :: 3.6
40
40
  Classifier: Programming Language :: Python :: 3.7
41
+ Classifier: Programming Language :: Python :: 3.8
42
+ Classifier: Programming Language :: Python :: 3.9
43
+ Classifier: Programming Language :: Python :: 3.10
44
+ Classifier: Programming Language :: Python :: 3.11
45
+ Classifier: Programming Language :: Python :: 3.12
46
+ Classifier: Programming Language :: Python :: 3.13
41
47
  Description-Content-Type: text/markdown
@@ -33,7 +33,7 @@ import setuptools
33
33
 
34
34
  setuptools.setup(
35
35
  name="stripe-api",
36
- version="0.3.0",
36
+ version="0.3.2",
37
37
  author="Hive Solutions Lda.",
38
38
  author_email="development@hive.pt",
39
39
  description="Stripe API Client",
@@ -60,6 +60,12 @@ setuptools.setup(
60
60
  "Programming Language :: Python :: 3.5",
61
61
  "Programming Language :: Python :: 3.6",
62
62
  "Programming Language :: Python :: 3.7",
63
+ "Programming Language :: Python :: 3.8",
64
+ "Programming Language :: Python :: 3.9",
65
+ "Programming Language :: Python :: 3.10",
66
+ "Programming Language :: Python :: 3.11",
67
+ "Programming Language :: Python :: 3.12",
68
+ "Programming Language :: Python :: 3.13",
63
69
  ],
64
70
  long_description=open(os.path.join(os.path.dirname(__file__), "README.md"), "rb")
65
71
  .read()
@@ -39,8 +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,
44
+ return_url=None,
43
45
  payment_method_types=[],
46
+ payment_method_options={},
44
47
  metadata={},
45
48
  ):
46
49
  url = self.base_url + "payment_intents"
@@ -53,12 +56,21 @@ class IntentAPI(object):
53
56
  params["confirm"] = confirm
54
57
  if description:
55
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
+ )
56
63
  if three_d_secure:
57
64
  params["payment_method_options[card][request_three_d_secure]"] = (
58
65
  three_d_secure
59
66
  )
67
+ if return_url:
68
+ params["return_url"] = return_url
60
69
  for payment_method_type in payment_method_types:
61
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
62
74
  for key, value in metadata.items():
63
75
  params["metadata[" + key + "]"] = value
64
76
  contents = self.post(url, params=params)
@@ -68,3 +80,11 @@ class IntentAPI(object):
68
80
  url = self.base_url + "payment_intents/%s/capture" % identifier
69
81
  contents = self.post(url)
70
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: stripe-api
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: Stripe API Client
5
5
  Home-page: http://stripe-api.hive.pt
6
6
  Author: Hive Solutions Lda.
@@ -38,4 +38,10 @@ Classifier: Programming Language :: Python :: 3.4
38
38
  Classifier: Programming Language :: Python :: 3.5
39
39
  Classifier: Programming Language :: Python :: 3.6
40
40
  Classifier: Programming Language :: Python :: 3.7
41
+ Classifier: Programming Language :: Python :: 3.8
42
+ Classifier: Programming Language :: Python :: 3.9
43
+ Classifier: Programming Language :: Python :: 3.10
44
+ Classifier: Programming Language :: Python :: 3.11
45
+ Classifier: Programming Language :: Python :: 3.12
46
+ Classifier: Programming Language :: Python :: 3.13
41
47
  Description-Content-Type: text/markdown
File without changes
File without changes