Skip to content

Commit

Permalink
Stripe Sdk Update & Amount Bug Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
0xRahad committed Dec 31, 2023
1 parent 84e99d4 commit 37e0374
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion StripeGate/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencies {
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'

//stripe sdk
implementation 'com.stripe:stripe-android:20.35.2'
implementation 'com.stripe:stripe-android:20.36.0'

def lottieVersion = "3.4.0"
implementation "com.airbnb.android:lottie:$lottieVersion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ public void onPaymentSheetResult(@NonNull PaymentSheetResult paymentSheetResult)


public void Integrate(String amount, String currency){

if (PUBLISHABLE_KEY == null || SECRET_KEY == null) {
Log.e("error", "Publishable Key or Secret Key is empty ");
return; // Return early if keys are null
Expand All @@ -94,7 +93,7 @@ public void Integrate(String amount, String currency){
this.currency = currency;
PaymentConfiguration.init(context, PUBLISHABLE_KEY);
createCustomerID();
getPaymentInfo(amount,currency);
getPaymentInfo(this.amount, this.currency); // Use class fields here
}

public void Apply() {
Expand All @@ -118,7 +117,7 @@ public void run() {
}


public void createCustomerID(){
private void createCustomerID(){
Call<CustomerResponse> call = RetrofitClient.getInstance().getAPI().getCustomerID("Bearer "+ SECRET_KEY);
call.enqueue(new Callback<CustomerResponse>() {
@Override
Expand All @@ -139,7 +138,7 @@ public void onFailure(Call<CustomerResponse> call, Throwable t) {
});
}

public void getEphemeralKey(String id){
private void getEphemeralKey(String id){
Call<EphemeralResponse> keys = RetrofitClient.getInstance().getAPI().getEphemeralKeys("Bearer "+SECRET_KEY
,"2023-10-16",customerID);

Expand Down

0 comments on commit 37e0374

Please sign in to comment.