Skip to content

jump-sdk/mobile-sdk-android

 
 

Repository files navigation

Publish Core and Compose Packages Maintainability Rating Technical Debt Bugs Security Rating Vulnerabilities

Integration

All integration options require a Spreedly account and an environment key. See Create Your API Credentials for details.

Installation

This library is not publicly published and must be built and delivered via your own maven repository or local setup.

Customization with SecureCreditCardForm

See the documentation for details on how to customize the form.

See also the sample usage in the demo app

SecureForm Components

See the documentation on the Composable functions

Full Customization with Core SDK

If you prefer a completely customized payment method collection and selection experience, you can use the Core SDK and SpreedlyClient For example, to create a new credit card payment method with Spreedly, create and configure a CreditCardInfo object, and send is using SpreedlyClient

Constructors:

CreditCardInfo(@NonNull String: fullName, @NonNull SpreedlySecureOpaqueString: number, @Nullable SpreedlySecureOpaqueString: verificationValue, @NonNull int: year, @NonNull int: month);
SpreedlyClient.newInstance(@NonNull String envKey, @NonNull String envSecret,@NonNull boolean test)

Example code:

CreditCardInfo info = new CreditCardInfo("Full Name", new SpreedlySecureOpaqueString("4111111111111111"), new SpreedlySecureOpaqueString("432"), 2025, 12);
SpreedlyClient client = SpreedlyClient.newInstance("your key", "your secret", true);
client.createCreditCardPaymentMethod(info, null, null).subscribe(new SingleObserver<TransactionResult<PaymentMethodResult>>() {
    @Override
  public void onSubscribe(@NonNull Disposable d) {

    }

    @Override
  public void onSuccess(TransactionResult<PaymentMethodResult> trans) {
        try {
            if (trans.succeeded) {
                Log.i("Spreedly", "trans.result.token: " + trans.result.token);
                //do something with trans result
            } else {
                Log.e("Spreedly", "trans.message: " + trans.message);
               // do something with error
            }
        } finally {
          //finish
        }
    }

    @Override
  public void onError(@NonNull Throwable e) {
        Log.e("Spreedly", e.getMessage(), e);
        //do something with error
    }
});

Checks / pre-commit

./gradlew :core-kmm:detektAndroidRelease :core-kmm:test :securewidgets-compose:detekt :securewidgets-compose:lintRelease