Skip to content

Commit

Permalink
Update back button handler
Browse files Browse the repository at this point in the history
  • Loading branch information
ioan-ghisoi-cko committed Nov 15, 2018
1 parent 026c57d commit 528dc36
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ dependencies {
implementation 'com.android.support:design:27.1.1'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.android.volley:volley:1.0.0'
implementation 'com.github.checkout:frames-android:v2.0.4'
implementation 'com.github.checkout:frames-android:v2.0.5'
}
```

> You can find more about the installation [here](https://jitpack.io/#checkout/frames-android/v2.0.4)
> You can find more about the installation [here](https://jitpack.io/#checkout/frames-android/v2.0.5)
> Please keep in mind that the Jitpack repository should to be added to the project gradle file while the dependency should be added in the module gradle file. [(see more about gradle files)](https://developer.android.com/studio/build)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,21 @@ public boolean dispatchKeyEventPreIme(KeyEvent event) {
!mState.hasFocus() &&
!mZip.hasFocus() &&
!mPhone.hasFocus()) {
mListener.onBillingCanceled();
if (mDatastore != null && mDatastore.getLastBillingValidState() != null) {
mDatastore.setCustomerName(mDatastore.getLastCustomerNameState());
mDatastore.setCustomerAddress1(mDatastore.getLastBillingValidState().getAddressLine1());
mDatastore.setCustomerAddress2(mDatastore.getLastBillingValidState().getAddressLine2());
mDatastore.setCustomerZipcode(mDatastore.getLastBillingValidState().getPostcode());
mDatastore.setCustomerCountry(mDatastore.getLastBillingValidState().getCountry());
mDatastore.setCustomerCity(mDatastore.getLastBillingValidState().getCity());
mDatastore.setCustomerState(mDatastore.getLastBillingValidState().getState());
mDatastore.setCustomerPhonePrefix(mDatastore.getLastBillingValidState().getPhone().getCountryCode());
mDatastore.setCustomerPhone(mDatastore.getLastBillingValidState().getPhone().getNumber());
repopulateFields();
mListener.onBillingCompleted();
} else {
mListener.onBillingCanceled();
}
return true;
} else {
requestFocus();
Expand Down
2 changes: 1 addition & 1 deletion demos/examples/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.github.checkout:frames-android:v2.0.4'
implementation 'com.github.checkout:frames-android:v2.0.5'
implementation 'com.android.support:design:27.1.1'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.android.volley:volley:1.0.0'
Expand Down
2 changes: 1 addition & 1 deletion demos/googlepay_example/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies {
implementation 'com.android.support:design:27.1.1'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.android.volley:volley:1.0.0'
implementation 'com.github.checkout:frames-android:v2.0.4'
implementation 'com.github.checkout:frames-android:v2.0.5'

// "wallet" is the only module needed for the Google Payment API and this sample app.
// Apps that selectively compile Google Play service APIs need only this dependency.
Expand Down

0 comments on commit 528dc36

Please sign in to comment.