diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index eda96916f..ed3caee67 100644 Binary files a/.idea/caches/build_file_checksums.ser and b/.idea/caches/build_file_checksums.ser differ diff --git a/demos/examples/app/src/main/java/checkout/com/demo/Demos/CustomisationDemo.java b/demos/examples/app/src/main/java/checkout/com/demo/Demos/CustomisationDemo.java index bf71b33d5..b016fc1df 100644 --- a/demos/examples/app/src/main/java/checkout/com/demo/Demos/CustomisationDemo.java +++ b/demos/examples/app/src/main/java/checkout/com/demo/Demos/CustomisationDemo.java @@ -5,19 +5,19 @@ import android.content.DialogInterface; import android.os.Bundle; import android.support.v7.app.AlertDialog; -import android.view.View; import com.android.volley.VolleyError; -import com.checkout.android_sdk.CheckoutAPIClient; -import com.checkout.android_sdk.PaymentForm.PaymentFormCallback; +import com.checkout.android_sdk.Models.BillingModel; +import com.checkout.android_sdk.Models.PhoneModel; import com.checkout.android_sdk.PaymentForm; -import com.checkout.android_sdk.Request.CardTokenisationRequest; +import com.checkout.android_sdk.PaymentForm.PaymentFormCallback; import com.checkout.android_sdk.Response.CardTokenisationFail; import com.checkout.android_sdk.Response.CardTokenisationResponse; import com.checkout.android_sdk.Utils.CardUtils.Cards; import com.checkout.android_sdk.Utils.Environment; import java.util.Locale; + import checkout.com.demo.R; public class CustomisationDemo extends Activity { @@ -25,8 +25,8 @@ public class CustomisationDemo extends Activity { private PaymentForm mPaymentForm; private ProgressDialog mProgressDialog; - // Callback used for the Payment Form interaction - private final PaymentFormCallback mFormListener = new PaymentFormCallback() { + // Callback used for the Payment Form interaction + private final PaymentFormCallback mFormListener = new PaymentFormCallback() { @Override public void onFormSubmit() { mProgressDialog.show(); // show loader @@ -61,47 +61,47 @@ protected void onCreate(Bundle savedInstanceState) { setContentView(R.layout.customisation_activity); // initialise the loader - mProgressDialog = new ProgressDialog(DemoActivity.this); + mProgressDialog = new ProgressDialog(CustomisationDemo.this); mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); mProgressDialog.setMessage("Loading..."); // initialise the payment from mPaymentForm = findViewById(R.id.checkout_card_form); mPaymentForm - .setFormListener(mFormListener) - .setEnvironment(Environment.SANDBOX) - .setKey("pk_test_6e40a700-d563-43cd-89d0-f9bb17d35e73") - .setAcceptedCard(new Cards[]{Cards.VISA, Cards.MASTERCARD}) - .setAcceptedCardsLabel("We accept this card types") - .setCardHolderLabel("Name on Card") - .setCardLabel("Card Number") - .setDateLabel("Expiration Datee") - .setCvvLabel("Security Code") - .setAddress1Label("Address 1") - .setAddress2Label("Address 2") - .setTownLabel("City") - .setStateLabel("State") - .setPostcodeLabel("Zip Code") - .setPhoneLabel("Phone No.") - .setPayButtonText("Pay Now") - .setDoneButtonText("Save") - .setClearButtonText("Clear") - .setDefaultBillingCountry(Locale.UK) - .injectCardHolderName("John Smith") - .injectBilling( - new BillingModel( - "1 address", - "2 address", - "POST CODE", - "GB", - "City", - "State", - new PhoneModel( - "+44", - "07123456789" - ) - ) - ); + .setFormListener(mFormListener) + .setEnvironment(Environment.SANDBOX) + .setKey("pk_test_6e40a700-d563-43cd-89d0-f9bb17d35e73") + .setAcceptedCard(new Cards[]{Cards.VISA, Cards.MASTERCARD}) + .setAcceptedCardsLabel("We accept this card types") + .setCardHolderLabel("Name on Card") + .setCardLabel("Card Number") + .setDateLabel("Expiration Datee") + .setCvvLabel("Security Code") + .setAddress1Label("Address 1") + .setAddress2Label("Address 2") + .setTownLabel("City") + .setStateLabel("State") + .setPostcodeLabel("Zip Code") + .setPhoneLabel("Phone No.") + .setPayButtonText("Pay Now") + .setDoneButtonText("Save") + .setClearButtonText("Clear") + .setDefaultBillingCountry(Locale.UK) + .injectCardHolderName("John Smith") + .injectBilling( + new BillingModel( + "1 address", + "2 address", + "POST CODE", + "GB", + "City", + "State", + new PhoneModel( + "+44", + "07123456789" + ) + ) + ); } private void displayMessage(String title, String message) {