Skip to content

Commit ec3e72a

Browse files
committed
v3.3.0 updates
1 parent 507db56 commit ec3e72a

File tree

4 files changed

+35
-6
lines changed

4 files changed

+35
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
## [3.2.3] - 2022-02-22
1+
## [3.3.0] - 2022-03-04
2+
3+
* New endpoint for Stripe Payment Intents.
4+
* Pubspec.yaml dependency updates.
5+
6+
* ## [3.2.3] - 2022-02-22
27

38
* Flutter version bump
49

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ In your flutter project add the dependency:
1515
``` dart
1616
dependencies:
1717
...
18-
woosignal: ^3.2.3
18+
woosignal: ^3.3.0
1919
```
2020

2121
### Usage example #

lib/woosignal.dart

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ import 'package:woosignal/models/response/setting_option_batch.dart';
5353
import 'package:woosignal/models/response/product_batch.dart';
5454

5555
/// WooSignal Package version
56-
const String wooSignalVersion = "3.2.3";
56+
const String wooSignalVersion = "3.3.0";
5757

5858
class WooSignal {
5959
WooSignal._privateConstructor();
@@ -760,6 +760,30 @@ class WooSignal {
760760
return payloadRsp;
761761
}
762762

763+
/// Creates a new payment intent and save details
764+
Future<Map<String, dynamic>?> stripePaymentIntentV2({
765+
String? amount,
766+
String? desc,
767+
String? email,
768+
Map<String, dynamic>? shipping,
769+
Map<String, dynamic>? customerDetails,
770+
}) async {
771+
Map<String, dynamic> payload = {
772+
"amount": amount,
773+
"receipt_email": email,
774+
"shipping": shipping,
775+
"desc": desc,
776+
"path": "order/v2/pi",
777+
"type": "post",
778+
"customer_details": customerDetails,
779+
};
780+
Map<String, dynamic>? payloadRsp =
781+
await _apiProvider.post("/order/v2/pi", payload);
782+
783+
_printLog(payloadRsp.toString());
784+
return payloadRsp;
785+
}
786+
763787
/// Check if the cart items are in stock and returns the users cart
764788
Future<List<dynamic>?> cartCheck(List<Map<String, dynamic>> cartLines) async {
765789
return await _wooSignalRequest<List<dynamic>?>(

pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: woosignal
22
description: WooCommerce REST API for dart, connect a WooCommerce store and start developing with our interface for their API endpoints.
3-
version: 3.2.3
3+
version: 3.3.0
44
homepage: https://woosignal.com
55
repository: https://github.com/woosignal/flutter-woocommerce-api
66
issue_tracker: https://github.com/woosignal/flutter-woocommerce-api/issues
@@ -10,9 +10,9 @@ environment:
1010
sdk: '>=2.19.0 <3.0.0'
1111

1212
dependencies:
13-
dio: ^5.0.0
13+
dio: ^5.0.1
1414
device_info_plus: ^8.0.0
15-
shared_preferences: ^2.0.15
15+
shared_preferences: ^2.0.18
1616
uuid: ^3.0.6
1717

1818
flutter:

0 commit comments

Comments
 (0)