Skip to content
Permalink
Browse files

update tracking

  • Loading branch information...
vanhungpc committed Feb 28, 2019
1 parent 29b7456 commit 045d2f377d52520167f9f96378b32141b2144867
Showing with 804 additions and 1,289 deletions.
  1. +5 −18 android/app/src/main/java/momo/momo_partner/demo/PaymentActivity.java
  2. +6 −0 android/momo_partner_sdk/build.gradle
  3. +0 −2 android/momo_partner_sdk/src/main/AndroidManifest.xml
  4. +135 −125 android/momo_partner_sdk/src/main/java/vn/momo/momo_partner/AppMoMoLib.java
  5. +17 −52 android/momo_partner_sdk/src/main/java/vn/momo/momo_partner/ClientHttpAsyncTask.java
  6. +0 −2 android/momo_partner_sdk/src/main/java/vn/momo/momo_partner/MoMoParameterNamePayment.java
  7. +0 −693 android/momo_partner_sdk/src/main/java/vn/momo/momo_partner/activity/ActivityMoMoWebView.java
  8. +0 −4 android/momo_partner_sdk/src/main/java/vn/momo/momo_partner/utils/MoMoConfig.java
  9. +29 −0 react-native/example-using-momosdk-react/android/.idea/codeStyles/Project.xml
  10. +11 −0 ...xample-using-momosdk-react/android/.idea/libraries/Gradle__android_arch_core_common_1_1_0_jar.xml
  11. +12 −0 ...ample-using-momosdk-react/android/.idea/libraries/Gradle__android_arch_core_runtime_1_1_0_aar.xml
  12. +11 −0 ...e-using-momosdk-react/android/.idea/libraries/Gradle__android_arch_lifecycle_common_1_1_0_jar.xml
  13. +12 −0 ...-momosdk-react/android/.idea/libraries/Gradle__android_arch_lifecycle_livedata_core_1_1_0_aar.xml
  14. +12 −0 ...-using-momosdk-react/android/.idea/libraries/Gradle__android_arch_lifecycle_runtime_1_1_0_aar.xml
  15. +12 −0 ...sing-momosdk-react/android/.idea/libraries/Gradle__android_arch_lifecycle_viewmodel_1_1_0_aar.xml
  16. +12 −0 ...react/android/.idea/libraries/Gradle__com_android_support_animated_vector_drawable_27_1_1_aar.xml
  17. +12 −0 ...ing-momosdk-react/android/.idea/libraries/Gradle__com_android_support_appcompat_v7_27_1_1_aar.xml
  18. +11 −0 ...osdk-react/android/.idea/libraries/Gradle__com_android_support_support_annotations_27_1_1_jar.xml
  19. +12 −0 ...g-momosdk-react/android/.idea/libraries/Gradle__com_android_support_support_compat_27_1_1_aar.xml
  20. +12 −0 ...-momosdk-react/android/.idea/libraries/Gradle__com_android_support_support_core_ui_27_1_1_aar.xml
  21. +12 −0 ...mosdk-react/android/.idea/libraries/Gradle__com_android_support_support_core_utils_27_1_1_aar.xml
  22. +12 −0 ...momosdk-react/android/.idea/libraries/Gradle__com_android_support_support_fragment_27_1_1_aar.xml
  23. +12 −0 ...-react/android/.idea/libraries/Gradle__com_android_support_support_vector_drawable_27_1_1_aar.xml
  24. +12 −0 ...ple-using-momosdk-react/android/.idea/libraries/Gradle__com_facebook_fresco_drawee_1_10_0_aar.xml
  25. +12 −0 ...ple-using-momosdk-react/android/.idea/libraries/Gradle__com_facebook_fresco_fbcore_1_10_0_aar.xml
  26. +12 −0 ...ple-using-momosdk-react/android/.idea/libraries/Gradle__com_facebook_fresco_fresco_1_10_0_aar.xml
  27. +12 −0 ...ng-momosdk-react/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_1_10_0_aar.xml
  28. +12 −0 ...mosdk-react/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_base_1_10_0_aar.xml
  29. +12 −0 ...dk-react/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_okhttp3_1_10_0_aar.xml
  30. +11 −0 ...act/android/.idea/libraries/Gradle__com_facebook_infer_annotation_infer_annotation_0_11_2_jar.xml
  31. +14 −0 ...sing-momosdk-react/android/.idea/libraries/Gradle__com_facebook_react_react_native_0_57_4_aar.xml
  32. +12 −0 ...-using-momosdk-react/android/.idea/libraries/Gradle__com_facebook_soloader_soloader_0_5_1_aar.xml
  33. +10 −0 ...ing-momosdk-react/android/.idea/libraries/Gradle__com_github_momo_wallet_mobile_sdk_1_0_3_aar.xml
  34. +11 −0 ...using-momosdk-react/android/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_3_0_2_jar.xml
  35. +11 −0 ...ple-using-momosdk-react/android/.idea/libraries/Gradle__com_parse_bolts_bolts_tasks_1_4_0_jar.xml
  36. +11 −0 ...le-using-momosdk-react/android/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_3_11_0_jar.xml
  37. +11 −0 ...dk-react/android/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_urlconnection_3_11_0_jar.xml
  38. +11 −0 ...example-using-momosdk-react/android/.idea/libraries/Gradle__com_squareup_okio_okio_1_14_0_jar.xml
  39. +11 −0 ...e/example-using-momosdk-react/android/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml
  40. +10 −0 ...xample-using-momosdk-react/android/.idea/libraries/Gradle__org_webkit_android_jsc_r174650_aar.xml
  41. +6 −0 react-native/example-using-momosdk-react/android/.idea/vcs.xml
  42. +23 −22 react-native/example-using-momosdk-react/android/app/app.iml
  43. +88 −367 react-native/example-using-momosdk-react/android/build/intermediates/dex-cache/cache.xml
  44. +1 −1 react-native/example-using-momosdk-react/android/example.iml
  45. +2 −2 react-native/example-using-momosdk-react/android/local.properties
  46. +131 −0 ...ve/example-using-momosdk-react/node_modules/react-native-momosdk/android/react-native-momosdk.iml
  47. +1 −1 react-native/example-using-momosdk-react/package.json
@@ -11,7 +11,6 @@
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
@@ -38,7 +37,6 @@
private String merchantCode = "CGV19072017";
private String merchantNameLabel = "Nhà cung cấp";
private String description = "Fast & Furious 8";
private String MOMO_WEB_SDK_DEV = "http://118.69.187.119:9090/sdk/api/v1/payment/request";//debug
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -67,6 +65,9 @@ protected void onCreate(Bundle savedInstanceState) {
private void requestPayment() {
AppMoMoLib.getInstance().setAction(AppMoMoLib.ACTION.PAYMENT);
AppMoMoLib.getInstance().setActionType(AppMoMoLib.ACTION_TYPE.GET_TOKEN);
//Set token tracking
AppMoMoLib.getInstance().setToken("eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJNT01PIiwiY3JlYXRlZCI6IlR1ZSBEZWMgMjUgMTU6NTA6MzIgSUNUIDIwMTgiLCJpYXQiOjE1NDU3Mjc4MzJ9.0tv2FgQhFFXcO7vK2lEoTUcduxpCe15siOnbnEjls9E");

if (edAmount.getText().toString() != null && edAmount.getText().toString().trim().length() != 0)
amount = edAmount.getText().toString().trim();

@@ -80,7 +81,6 @@ private void requestPayment() {
eventValue.put(MoMoParameterNamePayment.FEE, fee);
eventValue.put(MoMoParameterNamePayment.MERCHANT_NAME_LABEL, merchantNameLabel);

//client call webview
eventValue.put(MoMoParameterNamePayment.REQUEST_ID, merchantCode+"-"+ UUID.randomUUID().toString());
eventValue.put(MoMoParameterNamePayment.PARTNER_CODE, "CGV19072017");

@@ -99,29 +99,16 @@ private void requestPayment() {
eventValue.put(MoMoParameterNamePayment.EXTRA_DATA, objExtraData.toString());
eventValue.put(MoMoParameterNamePayment.REQUEST_TYPE, "payment");
eventValue.put(MoMoParameterNamePayment.LANGUAGE, "vi");
eventValue.put(MoMoParameterNamePayment.SUBMIT_URL_WEB, MOMO_WEB_SDK_DEV);

//client info custom parameter
// JSONObject objExtra = new JSONObject();
// try {
// objExtra.put("mobile", "+840966132647");
// objExtra.put("email", "momo-email@gmail.com");
// objExtra.put("fullname", "SDK Team");
// objExtra.put("lang", "en");
// } catch (JSONException e) {
// e.printStackTrace();
// }

eventValue.put(MoMoParameterNamePayment.EXTRA, "");
//Request momo app
AppMoMoLib.getInstance().requestMoMoCallBack(this, eventValue);


}


@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
AppMoMoLib.getInstance().trackEventResult(this,data);//request tracking result data
if(requestCode == AppMoMoLib.getInstance().REQUEST_CODE_MOMO && resultCode == -1) {
if(data != null) {
if(data.getIntExtra("status", -1) == 0) {
@@ -18,6 +18,12 @@ android {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "String", "URL_TRACK_DEV", '"http://172.16.13.25:5678/api/v1/app/sdk/event"'
buildConfigField "String", "URL_TRACK", '"https://ma.momo.vn/api/v1/app/sdk/event"'
}
debug {
buildConfigField "String", "URL_TRACK_DEV", '"http://172.16.13.25:5678/api/v1/app/sdk/event"'
buildConfigField "String", "URL_TRACK", '"https://ma.momo.vn/api/v1/app/sdk/event"'
}
}
useLibrary 'org.apache.http.legacy'
@@ -1,13 +1,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"

package="vn.momo.momo_partner">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:hardwareAccelerated="true">
<activity android:name=".activity.ActivityMoMoWebView"/>
</application>

</manifest>

0 comments on commit 045d2f3

Please sign in to comment.
You can’t perform that action at this time.