Answer the question
In order to leave comments, you need to log in
PayPal sandbox, no account history after transactions?
I made an account, created an application and several test accounts. Connected Express Checkout, configured everything. He writes what he needs, they say, the money was sent to the seller and the transaction was successful, I created it on the server and calculated what was needed in the response from the API. However, if you go to test accounts: 1 - there is no history that you successfully paid / accepted payment. 2 - does not withdraw money from the buyer. 3 - does not add to the seller.
Here is the code:
<div id="paypal-button-container"></div>
<script>
paypal.Button.render({
env: 'sandbox',
client: {
sandbox: 'Adn*******O1p',
},
commit: true,
payment: function(data, actions) {
return actions.payment.create({
transactions: [
{
amount: { total: '1', currency: 'USD' }
}
]
});
},
onAuthorize: function(data, actions) {
var EXECUTE_URL = laroute.route('pay_pal_pay');
var data = {
paymentID: data.paymentID,
payerID: data.payerID
};
return paypal.request.post(EXECUTE_URL, data)
.then(function (res) {
window.alert('Payment Complete!');
});
}
}, '#paypal-button-container');
</script>
Answer the question
In order to leave comments, you need to log in
I don't know why, the server-side creak helped me. There we send a request to create a payment, create it on our server, and return it to the front. Upon confirmation, we again send it to our server and validate it there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question