Returning value from backend function

I have following code in payments.jsw

export function paymentCreate(){
    let create_payment_json={
        "key1": "value2",
        "key2": "value2
    }
    return paypal.payment.create(create_payment_json, function (error, payment) {
        if (error) { throw error;  } else {
            for (let i = 0; i < payment.links.length; i++) {
                if (payment.links[i].rel === 'approval_url') {
                    const uri = payment.links[i].href;
                    //console.log(uri);
                    return payment(uri);
                }
            }
       }
    });
}

and this in button click

export function button1_click(event) {
 let s = paymentCreate()
    .then((uri) =>{
        console.log(uri);
    });
 
}

All I see in console log is undefined.
If I console.log(uri) in paymentCreate function, it logs the value just fine. But I can’t receive it in button click.

Any help please?

Well…
I’m a noob in here so pls pardon the typos and probably the wrong code in button1_click.

All I am looking for is to follow the payment.links[i].href when payment.links[i].rel === ‘approve_url’
I just can’t figure out how to redirect user to that url to authenticate payment.