Мы используем Recurly.js. Теперь платежи PayPal Pro доступны как для Recurly Hosted Payment Pages, так и для Recurly.js. Я интегрирую Paypal в соответствии с предоставленными документами Recurly.js и Paypal Payment Pro
Теперь возникает ошибка >>> ошибка API: настройте учетную запись PayPal с эталонными транзакциями в Recurly, прежде чем принимать платежи PayPal.
Я интегрирую PayPal Payment Pro в свою рекурсивную учетную запись, и ее статус включен (зеленый сигнал).
Но во время работы я получаю эту ошибку. что я должен делать ?
Рекуррентный пример кода
<script>
// Configure recurly.js
recurly.configure({ publicKey: '***************', api: 'https://api.recurly.com/js/v1' });
// On form submit, we stop submission to go get the token
$('form').on('submit', function (event) {
event.preventDefault();
// Reset the errors display
$('#errors').text('');
$('input').removeClass('error');
// Disable the submit button
$('button').prop('disabled', true);
var form = this;
// Now we call recurly.paypal with an object containing a 'description' property.
// This will open a new window, beginning the PayPal billing agreement flow.
// to tokenize the credit card information, then injects the token into the
// data-recurly="token" field above
recurly.paypal({ description: 'test' }, function (err, token) {
if (err) {
// Let's handle any errors using the function below
alert(err);
} else {
// set the hidden field above to the token we get back from Recurly
$('#recurly-token').val(token.id);
// Now we submit the form!
form.submit();
}
});
});
// A simple error handling function to expose errors to the customer
function error (err) {
console && console.error(err);
$('#errors').text('There was a problem intializing the PayPal transaction! Please try again in a few moments.');
$('button').prop('disabled', false);
}
</script>