proplem in paypal integration android

MrParadoxOffici
New Community Member

I am making an e-commerce android app for a client using phpmyAdmin I need to integrate paypal ,that's why i use paypal documentation to do that . i faced problem with paying to merchant from client that money don't transfer . i search but i didn't fount soluation for this . my code .

  CheckoutConfig config =new CheckoutConfig(
            getApplication(),
            YOUR_CLIENT_ID,
            Environment.SANDBOX,
            String.format("%s://paypalpay","com.paradox.prmaga.Pero"),
            CurrencyCode.USD,
            UserAction.PAY_NOW,
            new SettingsConfig(
                    true,
                    false
            )
        );
    PayPalCheckout.setConfig(config);



    payPalButton.setup(
            new CreateOrder() {
                @override
                public void create(@NotNull CreateOrderActions createOrderActions) {
                    ArrayList<PurchaseUnit> purchaseUnits = new ArrayList<>();

                    purchaseUnits.add(
                            new PurchaseUnit.Builder()
                                    .amount(
                                            new Amount.Builder()

                                                    .currencyCode(CurrencyCode.USD)
                                                    .value("10.00")
                                                    .build()
                                    )
                                    .build()

                    );

                    Order order = new Order(
                            OrderIntent.CAPTURE,
                            new AppContext.Builder()
                                    .userAction(UserAction.PAY_NOW)
                                    .build(),
                            purchaseUnits
                    );
                    createOrderActions.create(order, (CreateOrderActions.OnOrderCreated) null);
                }
            },
            new OnApprove() {
                @override
                public void onApprove(@NotNull Approval approval) {
                    approval.getOrderActions().capture(new OnCaptureComplete() {
                        @override
                        public void onCaptureComplete(@NotNull CaptureOrderResult result) {
                            Log.i("CaptureOrder", String.format("CaptureOrderResult: %s", result));
                            savepayment();
                        }
                    });
                }
            },
    new OnCancel() {
        @override
        public void onCancel() {
            Log.d("OnCancel", "Buyer cancelled the PayPal experience.");
        }
    },new OnError() {
                @override
                public void onError(@NotNull ErrorInfo errorInfo) {
                    Log.d("OnError", String.format("Error: %s", errorInfo));
                }
            }

    );

 code run without any problem but money don't transfer to me. i use sandbox buyier account to try but nothing happen . this code from debug

I/CaptureOrder: CaptureOrderResult: Error(message=Capture order failed., reason=LSAT upgrade failed while capturing order.)
Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.