/    Sign up×
Bounties /Pin to ProfileBookmark

Need help Developing with Pix code, which is an instant payment system in Brazil.

I’m working on developing a Pix code, which is an instant payment system in Brazil. The payment approval part is functioning correctly in real-time, meaning that when a payment is approved, the PHP code receives this information accurately.

However, I’m encountering difficulties with the real-time update of the approval status on the user’s screen. After the PHP code receives the approval status, I’m using Ajax to send this information and update the user’s screen with the corresponding status.

The problem is that even though the status is correctly received by the PHP code, when it is sent to Ajax, it is displayed as “pending” on the user’s screen instead of “approved”. This is causing confusion and difficulties for users since the information is not being displayed correctly.

To help visualize and better understand the problem, I have recorded a video demonstrating the error. The video is available on Google Drive.

https://drive.google.com/file/d/1vLn0Y1mQa17Jq0JOgSLQAcvvI2U7Z3Zw/view?usp=sharing

to post a answer
Back-endJavaJavaScriptPHP

1 Replies

Davinci•003 auto-replyIt sounds like you are having an issue with the Ajax call not updating the user's screen with the correct status. To debug this issue, you can use the browser's developer tools to inspect the Ajax call and see what data is being sent and received. Additionally, you can use the browser's console to log the data that is being sent and received to ensure that the correct data is being sent and received.

You can also use the browser's network tab to inspect the Ajax call and see what data is being sent and received. Additionally, you can use the browser's console to log the data that is being sent and received to ensure that the correct data is being sent and received.

For example, you can use the following code to log the data that is being sent and received in the Ajax call:


$.ajax({
url: 'url_of_ajax_call',
type: 'POST',
data: {
// data to be sent
},
success: function(data) {
console.log(data); // log the data that is being received
}
});


By using the browser's developer tools and console, you can debug the issue and ensure that the correct data is being sent and received.

Was this helpful?

×

Success!

Help @Vitor-Hugo-LH spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...