android billing how to enable enablePendingPurchases() : <p>I've moved from an old gradle of billing api, to the most recent to date, and now I've tried adding </p>

<pre><code>  BillingClient.Builder enablePendingPurchases = BillingClient.newBuilder(this).setListener(this);
</code></pre>

<p>but I can not get it to work, here's the error</p>

<pre><code>   Caused by: java.lang.IllegalArgumentException: Support for pending purchases must be enabled. Enable this by calling 'enablePendingPurchases()' on BillingClientBuilder.
        at com.android.billingclient.api.BillingClient$Builder.build(BillingClient.java:309)
        at com.aplicacion.vivaluganoapp.ar.ponerDineroActivity.setupBillingClient(ponerDineroActivity.java:144)
        at com.aplicacion.vivaluganoapp.ar.ponerDineroActivity.onCreate(ponerDineroActivity.java:125)
</code></pre>

<p>complete code:</p>

<pre><code>protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_poner_dinero);

        recyclerProduct.setHasFixedSize(true);
        recyclerProduct.setLayoutManager(new LinearLayoutManager(this));
        BillingClient.Builder enablePendingPurchases = BillingClient.newBuilder(this).setListener(this);

 enablePendingPurchases.build();
setupBillingClient();
    }




    private void setupBillingClient() {


        billingClient = BillingClient.newBuilder (this).setListener(this).build();

        billingClient.startConnection(new BillingClientStateListener() {
            @Override
            public void onBillingSetupFinished(BillingResult responseCode) {
                int maca = BillingClient.BillingResponseCode.OK;
                String maca2 = String.valueOf(maca);

                String maca3 = String.valueOf(responseCode);
                if (maca3 == maca2)
                {
                    Toast.makeText(ponerDineroActivity.this, "WORKS", Toast.LENGTH_SHORT).show();
                }
                else
                {
                    Toast.makeText(ponerDineroActivity.this, "ERROR", Toast.LENGTH_SHORT).show();
                }

            }

            @Override
            public void onBillingServiceDisconnected() {
                Toast.makeText(ponerDineroActivity.this, "Disconnected from Billing", Toast.LENGTH_SHORT).show();
            }
        });

    }

</code></pre>

<p>if I place only:</p>

<pre><code>BillingClient.Builder enablePendingPurchases = BillingClient.newBuilder(this);
</code></pre>

<p>the error is:</p>

<pre><code>Caused by: java.lang.IllegalArgumentException: Please provide a valid listener for purchases updates.
</code></pre>

<p>any  help?  i'm  tired of trying</p>
