Skip to content

Commit

Permalink
feat: add Halan APM, update androidSDK and iOS SDK to the latest & pu…
Browse files Browse the repository at this point in the history
…mp V2.6.19.
  • Loading branch information
muhammadalkady committed Nov 18, 2024
1 parent 4c2c18a commit 6ec9d9a
Show file tree
Hide file tree
Showing 14 changed files with 94 additions and 47 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,4 +237,10 @@

* Update Android SDK.
* Update iOS SDK.
* Add card validation support.
* Add card validation support.

## 2.6.19

* Update Android SDK.
* Update iOS SDK.
* Add Halan APM.
76 changes: 53 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Flutter PayTabs Bridge
![Version](https://img.shields.io/badge/flutter%20paytabs%20bridge-v2.6.18-green)
![Version](https://img.shields.io/badge/flutter%20paytabs%20bridge-v2.6.19-green)

Flutter paytabs plugin is a wrapper for the native PayTabs Android and iOS SDKs, It helps you integrate with PayTabs payment gateway.

Expand All @@ -12,7 +12,7 @@ Plugin Support:

```
dependencies:
flutter_paytabs_bridge: ^2.6.18
flutter_paytabs_bridge: ^2.6.19
```

## Usage
Expand Down Expand Up @@ -69,7 +69,7 @@ var shippingDetails = new ShippingDetails("shipping name",
screentTitle: "Pay with Card",
billingDetails: billingDetails,
shippingDetails: shippingDetails,
locale: PaymentSdkLocale.EN, //PaymentSdkLocale.AR or PaymentSdkLocale.DEFAULT
locale: PaymentSdkLocale.EN, //PaymentSdkLocale.AR, PaymentSdkLocale.FR, PaymentSdkLocale.TR, PaymentSdkLocale.UR or PaymentSdkLocale.DEFAULT.
amount: "amount in double",
currencyCode: "Currency code",
merchantCountryCode: "2 chars iso country code");
Expand Down Expand Up @@ -458,7 +458,7 @@ By default, the billing name is linked with card holder name, if you set its fla
```
## Customize the Theme:
![UI guide](theme_demo.jpg)
![UI guide](theme_demo.png)

### iOS Theme
Use the following guide to cusomize the colors, font, and logo by configuring the theme and pass it to the payment configuration.
Expand All @@ -481,29 +481,58 @@ android/src/main/res/values/colors.xml
````xml

<resources>
// to override colors
<color name="payment_sdk_primary_color">#000000</color>
<color name="payment_sdk_secondary_color">#1B1B1B</color>
<color name="payment_sdk_background_color">#292929</color>
<color name="payment_sdk_button_background_color">#45444A</color>
<color name="payment_sdk_input_field_background_color">#8E8E8D</color>
<color name="payment_sdk_stroke_color">#90918F</color>

<color name="payment_sdk_title_text_color">#FFFFFF</color>

<color name="payment_sdk_primary_font_color">#FFFFFF</color>
<color name="payment_sdk_secondary_font_color">#0094F1</color>
<!-- Override colors -->
<color name="payment_sdk_primary_color">#ffffff</color>
<color name="payment_sdk_secondary_color">#0073bc</color>
<color name="payment_sdk_status_bar_color">#444647</color>
<color name="payment_sdk_primary_font_color">#4c4c4c</color>
<color name="payment_sdk_secondary_font_color">#0073bc</color>
<color name="payment_sdk_hint_font_color">#a5a5a5</color>
<color name="payment_sdk_stroke_color">#e1e1e1</color>
<color name="payment_sdk_button_text_color">#FFF</color>
<color name="payment_sdk_hint_font_color">#D8D8D8</color>
<color name="payment_sdk_error_text_color">#650303</color>

// to override dimens
<dimen name="payment_sdk_primary_font_size">17sp</dimen>
<dimen name="payment_sdk_secondary_font_size">15sp</dimen>
<color name="payment_sdk_title_text_color">#1e1e1e</color>
<color name="payment_sdk_button_background_color">#0073bc</color>
<color name="payment_sdk_background_color">#F9FAFD</color>
<color name="payment_sdk_blue_F2FAFD">#F2FAFD</color>
<color name="payment_sdk_error_text_color">#EC2213</color>
<color name="payment_sdk_back_black_dim">#4D6E6E6E</color>
<color name="payment_sdk_input_field_background_color">#FFFFFFFF</color>
<color name="payment_sdk_enabled_switch_track_color">#00000000</color>
<color name="payment_sdk_enabled_switch_handle_color">#3db39e</color>
<color name="payment_sdk_disabled_switch_track_color">#00000000</color>
<color name="payment_sdk_disabled_switch_handle_color">#c7c7c7</color>
<color name="payment_sdk_switch_stroke_color">#4c4c4c</color>
<color name="payment_sdk_amount_font_color">#4c4c4c</color>
<color name="payment_sdk_original_amount_font_color">#a5a5a5</color>
<color name="payment_sdk_billing_header_background_color">#0073bc</color>
<color name="payment_sdk_billing_text_color">#FFF</color>

<!-- Override dimens -->
<dimen name="payment_sdk_title_font_size">18sp</dimen>
<dimen name="payment_sdk_title_margin">24dp</dimen>
<dimen name="payment_sdk_primary_font_size">16sp</dimen>
<dimen name="payment_sdk_secondary_font_size">16sp</dimen>
<dimen name="payment_sdk_button_font_size">16sp</dimen>
<dimen name="payment_sdk_separator_thickness">1dp</dimen>
<dimen name="payment_sdk_stroke_thickness">.5dp</dimen>
<dimen name="payment_sdk_input_corner_radius">8dp</dimen>
<dimen name="payment_sdk_card_corner_radius">8dp</dimen>
<dimen name="payment_sdk_card_margin">16dp</dimen>
<dimen name="payment_sdk_billing_header_corner_radius">0dp</dimen>
<dimen name="payment_sdk_billing_header_margin">0dp</dimen>
<dimen name="payment_sdk_button_corner_radius">8dp</dimen>
<dimen name="payment_sdk_error_font_size">12sp</dimen>
<dimen name="payment_sdk_amount_font_size">16sp</dimen>

<!-- Override styles -->
<style name="PaymentSdkTheme" parent="Theme.MaterialComponents.NoActionBar">
<!-- Hides the payment screen title background -->
<item name="payment_sdk_hideScreenTitleBackground">true</item>
<!-- Sets the alignment of the payment screen title [start-end-center] -->
<item name="payment_sdk_screenTitleAlignment">start</item>
<!-- Hides the card and button shadows -->
<item name="payment_sdk_hideViewsShadow">true</item>
</style>

</resources>
````
Expand Down Expand Up @@ -583,7 +612,8 @@ enum PaymentSdkAPms {
SAMSUNG_PAY,
APPLE_PAY,
SOUHOOLA,
TABBY
TABBY,
HALAN
}
```

Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ android {
}

dependencies {
implementation 'com.paytabs:payment-sdk:6.6.6'
implementation 'com.paytabs:payment-sdk:6.6.13'
}
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ private PaymentSdkConfigurationDetails getPaymentSdkConfigurationDetails(JSONObj
private Map<String, Object> getMetadata() {
Map<String, Object> metadata = new HashMap<>();
metadata.put("PaymentSDKPluginName", "flutter");
metadata.put("PaymentSDKPluginVersion", "2.6.18");
metadata.put("PaymentSDKPluginVersion", "2.6.19");
return metadata;
}

Expand Down
22 changes: 11 additions & 11 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.6.18"
version: "2.6.19"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -142,18 +142,18 @@ packages:
dependency: "direct main"
description:
name: path_provider
sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378
sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
version: "2.1.5"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7"
sha256: c464428172cb986b758c6d1724c603097febb8fb855aa265aeecc9280c294d4a
url: "https://pub.dev"
source: hosted
version: "2.2.10"
version: "2.2.12"
path_provider_foundation:
dependency: transitive
description:
Expand Down Expand Up @@ -190,10 +190,10 @@ packages:
dependency: transitive
description:
name: platform
sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65"
sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984"
url: "https://pub.dev"
source: hosted
version: "3.1.5"
version: "3.1.6"
plugin_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -275,10 +275,10 @@ packages:
dependency: transitive
description:
name: xdg_directories
sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d
sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15"
url: "https://pub.dev"
source: hosted
version: "1.0.4"
version: "1.1.0"
sdks:
dart: ">=3.4.0 <4.0.0"
flutter: ">=3.22.0"
dart: ">=3.5.0 <4.0.0"
flutter: ">=3.24.0"
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.8
path_provider: ^2.1.4
path_provider: ^2.1.5

dev_dependencies:
flutter_test:
Expand Down
2 changes: 1 addition & 1 deletion ios/Classes/SwiftFlutterPaytabsBridgePlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public class SwiftFlutterPaymentSDKBridgePlugin: NSObject, FlutterPlugin {
configuration.paymentNetworks = generatePaymentNetworks(paymentsArray: paymentNetworks)
}

configuration.metaData = ["PaymentSDKPluginName": "flutter", "PaymentSDKPluginVersion": "2.6.18"]
configuration.metaData = ["PaymentSDKPluginName": "flutter", "PaymentSDKPluginVersion": "2.6.19"]
return configuration
}

Expand Down
4 changes: 2 additions & 2 deletions ios/flutter_paytabs_bridge.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
Pod::Spec.new do |s|
s.name = 'flutter_paytabs_bridge'
s.version = '2.4.0'
s.version = '2.6.19'
s.summary = 'A new flutter plugin project.'
s.description = <<-DESC
A new flutter plugin project.
Expand All @@ -16,7 +16,7 @@ A new flutter plugin project.
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.platform = :ios, '11.0'
s.dependency "PayTabsSDK", "6.6.21"
s.dependency "PayTabsSDK", "6.6.32"
s.static_framework = true
# Flutter.framework does not contain a i386 slice.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
Expand Down
6 changes: 4 additions & 2 deletions lib/PaymentSdkApms.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ enum PaymentSdkAPms {
SAMSUNG_PAY,
APPLE_PAY,
SOUHOOLA,
TABBY
TABBY,
HALAN
}

extension PaymentSdkTokenFormatExtension on PaymentSdkAPms {
Expand Down Expand Up @@ -46,7 +47,8 @@ extension PaymentSdkTokenFormatExtension on PaymentSdkAPms {
return 'souhoola';
case PaymentSdkAPms.TABBY:
return 'tabby';

case PaymentSdkAPms.HALAN:
return 'halan';
default:
return null;
}
Expand Down
9 changes: 9 additions & 0 deletions lib/PaymentSdkLocale.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
enum PaymentSdkLocale {
AR,
EN,
FR,
TR,
UR,
DEFAULT,
}

Expand All @@ -11,6 +14,12 @@ extension PaymentSdkLocaleExtension on PaymentSdkLocale {
return "ar";
case PaymentSdkLocale.EN:
return "en";
case PaymentSdkLocale.FR:
return "fr";
case PaymentSdkLocale.TR:
return "tr";
case PaymentSdkLocale.UR:
return "ur";
case PaymentSdkLocale.DEFAULT:
return "default";
default:
Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ packages:
dependency: "direct main"
description:
name: path_provider
sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378
sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
version: "2.1.5"
path_provider_android:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_paytabs_bridge
description: Flutter plugin for Paytabs, used to handle payments using Card, Apms ... etc.
version: 2.6.18
version: 2.6.19
homepage: "https://github.com/paytabscom/flutter-sdk-bridge"
environment:
sdk: ">=2.12.0 <4.0.0"
Expand All @@ -9,7 +9,7 @@ environment:
dependencies:
flutter:
sdk: flutter
path_provider: ^2.1.4
path_provider: ^2.1.5
dev_dependencies:
flutter_test:
sdk: flutter
Expand Down
Binary file removed theme_demo.jpg
Binary file not shown.
Binary file added theme_demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6ec9d9a

Please sign in to comment.