Skip to content

Commit

Permalink
Card Brand validator depnedency removed
Browse files Browse the repository at this point in the history
  • Loading branch information
AhlaamK-tap committed Oct 6, 2022
1 parent 9eb8370 commit db3dfe7
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 6 deletions.
Binary file not shown.
Binary file added .gradle/6.7/executionHistory/executionHistory.lock
Binary file not shown.
Binary file added .gradle/6.7/fileChanges/last-build.bin
Binary file not shown.
Binary file added .gradle/6.7/fileHashes/fileHashes.bin
Binary file not shown.
Binary file added .gradle/6.7/fileHashes/fileHashes.lock
Binary file not shown.
Binary file added .gradle/6.7/fileHashes/resourceHashesCache.bin
Binary file not shown.
Empty file added .gradle/6.7/gc.properties
Empty file.
Binary file added .gradle/6.7/javaCompile/classAnalysis.bin
Binary file not shown.
Binary file added .gradle/6.7/javaCompile/jarAnalysis.bin
Binary file not shown.
Binary file added .gradle/6.7/javaCompile/javaCompile.lock
Binary file not shown.
Binary file added .gradle/6.7/javaCompile/taskHistory.bin
Binary file not shown.
Binary file added .gradle/checksums/checksums.lock
Binary file not shown.
Empty file.
19 changes: 19 additions & 0 deletions .idea/modules/AndroidXSDK.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# CHANGELOG
[3.15.12] - 2022-10-06
### Hot Fix:
- Minor Hot fix for dynamic card brand name
### Impact on existing integrations:
- The update does not impact existing integrations.
### Recommended changes for existing integrations before updating:
- None.
[3.15.11] - 2022-08-28
### Hot Fix:
- Minor Hot fix for callback added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ To integrate goSellSDK into your project add it in your **root** `build.gradle`
Step 2. Add the dependency
```java
dependencies {
implementation 'com.github.Tap-Payments:goSellSDK-AndroidX:3.15.11'
implementation 'com.github.Tap-Payments:goSellSDK-AndroidX:3.15.12'
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ private boolean comparePaymentOptionWithCardScheme(@NonNull PaymentOption paymen
}


if (paymentOption.getBrand().compareTo(cardScheme.getCardBrand()) == 0) {
if (paymentOption.getName().compareTo(String.valueOf(cardScheme.getCardBrand())) == 0) {
return true;
}
// stop this check to avoid displaying mada with master in case of scheme is not mada
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public final class PaymentOption implements Comparable<PaymentOption>, Currencie

@SerializedName("name")
@Expose
private CardBrand brand;
private String name;

@SerializedName("image")
@Expose
Expand Down Expand Up @@ -60,7 +60,7 @@ public final class PaymentOption implements Comparable<PaymentOption>, Currencie
@SerializedName("asynchronous")
@Expose
private boolean asynchronous;

private CardBrand brand;
/**
* Gets id.
*
Expand All @@ -85,7 +85,7 @@ public String getSourceId() {
* @return the name
*/
public String getName() {
return (getBrand()!=null)? getBrand().getRawValue():"";
return (getBrand()!=null)? getBrand().getRawValue():name;
}

/**
Expand All @@ -94,6 +94,12 @@ public String getName() {
* @return the brand
*/
public CardBrand getBrand() {
// System.out.println("name values are#######"+name);
for (CardBrand brand : CardBrand.values()) {
if (brand.name().equalsIgnoreCase(name)) {
return brand;
}
}
return brand;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ public void setPaymentOption(CardBrand cardBrand,CardScheme cardScheme) {
}else {
if(cardBrand!=null){
for(PaymentOption paymentOption: data.getPaymentOptions()){
if(paymentOption.getBrand().compareTo(cardBrand)==0){
if(paymentOption.getName().compareTo(String.valueOf(cardBrand))==0){
this.selectedCardPaymentOption = paymentOption;
updatePayButtonWithExtraFees(paymentOption);
}
Expand Down

0 comments on commit db3dfe7

Please sign in to comment.