function reverseArrayInPlace(array){
for( let i = 0; i < array.length; i++ ){
array.splice(i, 0, array.pop())
}
}
<a id="link-pay">Купить</a>
let button = document.getElementById("link-pay");
button.addEventListener("click", function(){
pay(
{ amount:300, currency:'RUB', order_number:'101', description: 'Товар заказ 101' },
function(order) { Success(order) },
function(order) { Fail(order) }
)
})