facebook payments disputes callback - facebook-graph-api

Can anybody tell how can I handle facebook payments disputes callback in php? Code is preferable. I am handling disputes in my app and I have gone through this link https://developers.facebook.com/docs/howtos/payments/disputesrefunds/
when a user disputes an order, a realtime update is sent to the developer specified URL with the associated payment_id. But I dont know in which format I will receive it and I dont know how to handle disputes ahead in the code.

Related

App not getting data from Graph API anymore & problems filling out for review

Take a breath... it's a very specific question, not directly a bug.
(But I can't get an answer from Facebook, after thousands of FAQ pages I somehow landed in a chat with Facebook Advertisers Support, they told me to come here.)
Description of my app
I have a Facebook Page, on which I'm sharing events from some other Facebook Pages I'm cooperating with. Kind of an event aggregator. The main goal is to help people who are new in town to find all that interesting events and the groups and pages they are organized by.
As you can imagine, it's based on a server-side application, that collects the upcoming events through Graph API and posts on my own Facebook Page the day before the event.
Of course I had to give the server-side application the manage_pages and publish_pages right. This Facebook App will never be used by an end-user, I'm the only user and I'm only posting to my own Facebook Page.
The server-side application worked fine for more than a year.
I just started a Facebook Ad Campaign and poster and flyers are currently being printed. And now...
What broke
You all heard of Cambridge Analytica. Due to these bad guys Facebook is currently changing a lot. One change was this:
As we begin enhancing our new app review process and make changes to our platform, the Events, Groups, Pages and Instagram APIs will no longer be available to new developers. Testing of our more robust process starts today and the new process should resume in a few weeks, but apps currently accessing Events and Groups APIs will lose access today. Going forward, access to these APIs will require a formal app review and for apps using the Pages API, submission is required within 90 days once app review resumes or access will be removed.
(See https://developers.facebook.com/blog/post/2018/04/04/facebook-api-platform-product-changes)
Since nearly two weeks my server-application can't fetch events. Graph API is always returning an empty array data: [].
I have full understanding for this. Now I tried to follow these new requirements and had a look on how to submit my App for review. But that's where my struggles began:
The specific problem
The whole form for applying for review is aimed to Apps for end-users, not server-side bots.
I should provide details on why I'm using manage_pages or publish_pages. Well okay...
When selecting "automated posting" there immediatly a message pops up, telling me, that this is not allowed. Of course it is not - for applications that post in the name of persons without their knowing and aggreement. But my App is posting in the name of my own Facebook Page and I'm the only user and I'm knowing what's going to be posted. So I have to select "Other" and enter a custom description. No problem.
But at the end of the form there's asked for a Screencast! What should I make a movie of? Should I make a slideshow of my code? I can't save this form without that Screencast.
I want to be conform to the new Facebook processes, but I simply don't know how to become approved nor at least fill out for review...
I know this is not a programming question but Facebook directed me here.
So I hope I find a Facebook official or Facebook developer here. Thank you so far!

Sharing via API on Facebook - differentiate between "success" and "canceled"?

The documentation for Facebook's Feed Dialog and Share Dialog suggest that if a user is not logged in to your app, you have no way of determining whether or not the user actually shared the story or just opened the dialog and clicked "Cancel".
My experimentation seems to match this behavior. Can someone please confirm that this is the case? (I would love it if I were wrong)
To clarify: I understand there's no way to receive post_id as a response if the user is not logged in (Facebook has deprecated this behavior). However, I'm surprised there's not even a way to determine if a post was actually shared or if the "Cancel" button was clicked...
It seems like exposing this isn't a "privacy risk" for Facebook; having this success/canceled boolean available would be very useful in building a good UX.

Django paypal checkout for WHOLE cart

I made a Django online-store site and I need to include paypal checkout system for the cart, but solutions I found online either just for one item only(Buy Now buttons) or something like django-paypal-cart, which is not well-documented and I can't figure out how to make it to the checkout.
Please, give me some hint, maybe good article about how to make your cart items go to the checkout, anything will be highly appreciated, I don't know what else to google now
There are numerous options for tying PayPal into your website or app. Depending on exactly what you're doing or how good you are with web service API's you may choose one or another.
If you want to keep things simple, you can stick with Payments Standard. This is basically what you're referring to about the one item only buy now button, but you can use the cart upload command method to build a form that includes multiple items and pass it all over to PayPal at once.
If you prefer web service API's I'd recommend using Express Checkout. This consists of SetExpressCheckout, GetExpressCheckoutDetails, and DoExpressCheckoutPayment. Read through that general EC documentation to get familiar with the calls and how it all flows.
Another thing I would highly recommend utilizing is Instant Payment Notification (IPN). This is a feature where PayPal will POST transaction data to a listener script that you have sitting on your server any time a transaction occurs on your PayPal account. This includes payments, refunds, disputes, cleared payments that were pending, etc. This allows you to automate tasks like updating your database, sending out custom email notifications, hitting 3rd party web services, etc. and it happens in real-time, so it's very powerful.

How to whitelist Facebook app to send private inbox message by graph api

There have many people asking around how to send private inbox message by graph api, i search for long time, the answer is no. the reason is "App must be on whitelist"
Alternate solution is send by chat api (xampp). but this is not my solution. coz html message is not supported in chat api.
I know dropbox can do it, may i ask how to whitelist my app in Facebook to send inbox message?
I have the same requirement for an app that I am developing and I haven't been able to find any explicit directions on how to get onto the "white list".
However, my suspicion is that you need to apply to get into the Preferred Marketing Developer Program
At least, this is what Facebook says you need to do to get white listed to use the Ads API:
The Ads API is a restricted platform which may only be accessed by whitelisted Apps. You can learn more about the program and apply online. You need to apply separately for each app.
I am also struggling with this question for a while now.
I've posted my question on the facebook.stackoverflow.com site: http://facebook.stackoverflow.com/questions/13587441/facebook-invite-friends-functionality-for-multiple-recipients-custom-message
Isn't there any way of handling this issue? Help is highly appreciated!

How would I securely handle paid memberships?

I'm building a simple Django application for a client which will allow for users to register paid accounts to gain access certain parts of the site; however, I've never handled payment processing beyond a few simple Paypal buttons.
My question is, how would I securely handle and verify payments in this situation?
You might be able to use some of the payment code from Satchmo:
http://www.satchmoproject.com/docs/dev/payment.html