3

Launch Stripe Connect page in Stripe Dialog.

Stripe Connect Using Following Code:

mStripeButton = (StripeButton) PaymentOptionPage.findViewById(R.id.StripeConnect);

        mStripeButton.setStripeApp(mApp);

        mStripeButton.addStripeConnectListener(new StripeConnectListener() {

            @Override
            public void onConnected() {

                Log.e("getAccessToken", "" + mApp.getAccessToken());

                Stripe.apiKey = mApp.getAccessToken();

                Log.e("Stripe.apiKey", "" + Stripe.apiKey);

                Log.e("getUserId", "" + mApp.getStripeSession().getUserId());


            }

            @Override
            public void onDisconnected() {

                Log.e("getAccessToken", "Disconnected");

                Log.e("getUserId", "" + mApp.getStripeSession().getUserId());

            }

            @Override
            public void onError(String error) {
                Toast.makeText(mContext, error, Toast.LENGTH_SHORT).show();
            }

        });

when Remember my password Checked is checked after Connect to Stripe following exception throws:

09-23 07:14:38.301: W/System.err(9597): java.io.FileNotFoundException: https://connect.stripe.com/oauth/token 09-23 07:14:38.301: W/System.err(9597): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:197)

09-23 07:14:38.301: W/System.err(9597): at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)

09-23 07:14:38.301: W/System.err(9597): at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)

09-23 07:14:38.301: W/System.err(9597): at com.healingradius.Stripe.StripeUtils.executePost(StripeUtils.java:64)

09-23 07:14:38.301: W/System.err(9597): at com.healingradius.Stripe.StripeApp$3.run(StripeApp.java:98) 09-23

07:14:38.396: W/EGL_emulation(9597): eglSurfaceAttrib not implemented

09-23 07:14:38.396: W/OpenGLRenderer(9597): Failed to set EGL_SWAP_BEHAVIOR on surface 0xabb5ad20, error=EGL_SUCCESS 09-23 07:14:38.422: I/StripeConnect(9597): StripeApp.mHandler.handleMessage(): Calling mListener.onSuccess()

09-23 07:14:38.465: D/StripeButton(9597): Calling OAuthAuthenticationListener.onSuccess() 09-23 07:14:38.465: D/StripeButton(9597): Disconnected 09-23 07:14:38.465: D/StripeButton(9597): Calling mStripeConnectListener.onDisconnected()

09-23 07:14:38.466: E/getAccessToken(9597): Disconnected 09-23 07:14:38.466: E/getUserId(9597): null 09-23 07:14:38.466: D/StripeConnect(9597): StripeConnectAPI.OAuthWebViewClient.onPageFinished(): url: http://localhost/?scope=read_write&code=ac_72FiJhG5tvzMi7U1yoSGaYV6MCsaZC9I#

tarzanbappa
  • 4,930
  • 22
  • 75
  • 117
Deva
  • 150
  • 2
  • 2
  • 17

0 Answers0