Integrating Facebook Credits results in "The application you are using is not responding." - facebook

I've been trying to integrate Facebook Credit purchases into my app, but any call to the pay dialog results in the error message "The application you are using is not responding." To eliminate any application specific problems, I've downloaded the Credits API Example and am just trying to get that to work -- it results in the same error message.
I've been trying for a couple of days to pinpoint this error message, but with no luck. Here's what I know so far:
Clicking the "Pay with Facebook" button results in error code 1383008, but there's no error_message being displayed.
I'm running Apache 2.2 on Windows 7. As far as I can tell, Apache is configured to allow requests from any source.
The canvas page is configured to point at http://localhost:8080/facebook.../ while the callback page is configured to point at http://localhost:8080/facebook.../callback.php. However, I have verified that the callback page is not being accessed.
I'm not sure how to verify whether or not Facebook is receiving my data correctly or if it's passing anything back. Any help in this regard would also be appreciated!

Credits attempts to make a callback to a web accessible url (or IP). If Facebook's spider cannot fetch the information from the callback script, then it will continue to return errors, since Facebook expects you to send information like the cost, name, image, custom parameters in order to process the payment.
Have a look at the creating a callback section of the docs:
http://developers.facebook.com/docs/creditsapi/

Adding to Fancis' answer, what you can do is setup a hole in your firewall and connect it to a dynamic dns service such as http://dyn.com/. Then you will be able to test your credits code.

Related

What could be the reason for a Google Action with external endpoint (API) to work on the Actions Console Simulator, but not as deployed?

I am new to the whole creation-process of Google Actions.
I created an Action with the new Action Console.
It has an fulfillment endpoint to my server (as example: www.mypage.com/api).
For testing purposes it has no authentification, so it generates a public API response.
Said API generates a simple JSON response based on a send event handler.
In short: Action onEnter sends handler to API, API queries SQL database and sends the response back to my Google Action that then "speaks" the SQL result.
The result with the Actions Console Simulator is:
Testing with "Smart Display device: everything works.
Testing with "Speaker (e.g. Google Home): everything works.
Testing with "Phone": main intent is invoked and text is shown but does not get spoken.
So i tested the command "Hey Google, talk to the unicorn app" directly on my smartphone.
Here **everything works fine ** as said smartphone has the same e-mail like the one on my Action Console account: it recognizes the main invocation command and when i ask by voice to get the data, the data is received from my server and spoken.
So something is wrong with the "Phone" device in the simulator. This has been confirmed by me from other users saying that they often have trouble with the simulator function correctly.
I then deployed my Action.
It was reviewed and approved.
A few seconds later i received an auto-email saying that there were too many errors with my app, asking me to check its health status. I did so and in the Health tab, i can see that it has an error but it does not show me what the error is.
THEN I CONTACTED A ACTIONS-ON-GOOGLE EXPERT
They helped me a lot into the right direction but could not go deeper into the problem as my connection (the endpoint API) is outside of their servers.
So i ended with their tip on checking the Google Cloud Logging Console.
As said Logging Console is also new for me, i learned on how to query my results but:
How can i query for the so called "is_health_check" flag?
I am asking this because the Google Expert recommended me to search for said flag but i do not know on how to query it.
Sorry for this ultra-long entry but i am trying to be as transparent to you as possible, as i have been trying this out for several days now.
Thanks in advance for your time, ppl!
So the error is simple once that you know how Google handles the external webhooks. Thanks to the help of 2 Actions-On-Google Experts i was informed that Google pings your external Webhook from time to time.
As soon as they get an error as result from said ping, the Action will be deactivated from the Assistant until a new ping response sends that everything is fine again.
My problem was that after deploying the action and while it was under reviews, i continued to work on the code on my server. While coding, the Google server pinged and received an error code.
My fault, but at least i learned the thing about pinging your action!

Failed to connect to host Input Server Uri = https://pilot-payflowpro.paypal.com:443

I spent the last day and a half researching this problem to no avail. I found many similar problems, but none that exactly address my issue. I am attempting to integrate Payflow Pro with transparent redirect, but cannot successfully complete a transaction. I am using the test environment with a test Payflow Gateway account.
I can successfully retrieve a secure token by posting the following from my test server to https://pilot-payflowpro.paypal.com:
PARTNER=[hidden]&VENDOR=[hidden]&USER=[hidden]&PWD=[hidden]&TRXTYPE=S&TENDER=C&CREATESECURETOKEN=Y&SECURETOKENID=20180916085333999&URLMETHOD=POST&SILENTTRAN=TRUE&AMT=2&BILLTOFIRSTNAME=John&BILLTOLASTNAME=Doe&BILLTOADDRESS=123TestDr.&BILLTOCITY=Testcity&BILLTOSTATE=TN&BILLTOZIP=55511&BILLTOEMAIL=johndoe#test.com&USER1=3&USER2=&USER3=0&USER4=2
to which I receive the following response:
RESULT=0&SECURETOKEN=[hidden]&SECURETOKENID=20180916085333999&RESPMSG=Approved
NOTE: I have configured a Return URL using PayPal Manager, which is why RETURNURL is not included in the secure token request. However, I also have tried with RETURNURL specified, and I have obtained the same end result.
I use the results from the secure token request to create a cc collection form. I input test credit card details using acct# 5105105105105100, then post the following from the browser directly to https://pilot-payflowlink.paypal.com:
fund_id=3&ACCT=5105105105105100&CVV2=555&EXPMONTH=01&EXPYEAR=20&EXPDATE=0120&SECURETOKENID=20180916085333581&SECURETOKEN=[hidden]&feeTokenID=20180916085333999&feeToken=[hidden]
The response is properly redirected to the Hosted Page error URL I have specified in my Payflow Manager Service Settings. My problem is that I do not understand why it is redirecting to the error url with the following message:
RESPMSG=Failed to connect to host Input Server Uri = https://pilot-payflowpro.paypal.com:443
NOTE: The value above is only one part of the response sent to the error page. The rest of the return values include information from my original secure token request, which I would assume could only be returned if a successful connection had been established with the link in the error message??
To clearly state the problem:
I have already successfully connected from my test server to the link specified in the error message, when first I obtained the secure token.
The post that results in the error message was sent from the browser (in this case, on the same physical box as my test server) to https://pilot-payflowlink.paypal.com, which is not the URL specified in the error message.
Finally, the error seemingly occurs during the Payflow process - to my understanding, there should not be a call from my server or the browser to the link in the error message at this point during the process. I mention this specifically to address the many search results I found relating this particular error message to PayPal's requirement for TLS1.2, which is already properly configured on my server (I should mention for the sake of completeness, I do still have TLS1.0 enabled on my test server, but cannot disable it for unrelated reasons. Nonetheless, I was able to successfully connect to obtain a secure token, and my server passes PayPal's own TLS test at https://tlstest.paypal.com/).
I should mention that I also have tried to complete this same transaction on our production server, still using test credentials and test endpoints at PayPal, with exactly the same results. The test server is also set up for TLS1.2 with TLS1.0 enabled, and also passes PayPal's test.
This problem may be the one that pushes me full-on into insanity, so any help really would be appreciated!!
Disabling TLS1.0 has helped others with this issue. If you keep having problems, contact PayPal's support
For anyone who might find this question and be similarly frustrated, I want to share that I was able to solve the problem by creating a new Payflow Gateway test account.
I spent a great deal of time on trial and error solutions with no success, and PayPal Merchant Technical Services was able to duplicate the problem but was also unable to find a solution. Finally, after simplifying my test app as much as possible (two bare-bones HTML forms filled in and submitted manually), I came to the conclusion that there might be something wrong with my test account. Upon creating a new account with new credentials, then inserting them back into my original code, everything worked perfectly.
As of this morning, PayPal MTS is continuing to research the problem, since others have reported similar issues.
For others with similar problems, it is worth noting that I am now able to complete transactions while TLS 1.0 remains enabled.

Payments in our game stopped working, "object does not exist"

Our in-game transactions suddenly stopped working properly in one of our games. When a player tries to buy something, they are charged, but then an unknown error occurs and the player is not provided the items they tried to purchase.
Here is the screenshot: https://i.gyazo.com/e7beb162e9e94c9dd50008f1e0b6b78c.png
According to our investigation, the object ID coming to our payment callback cannot be found, even through the Graph API explorer.
Here's an example:
Our server receives the following data from payment callback:
{"object":"payments","entry":[{"id":"1005703272873733","time":1479471429,"changed_fields":["actions"]}]}
We then send a request:
https://graph.facebook.com/PAYMENT_ID?access_token=APP_ACCESS_TOKEN
and receive an error message. The same error occurs in Graph API Explorer
The app name is Butterfly Miracle
App ID is 1186246188099014
This is a critical issue that cripples the game.
EDIT: The problem is still unresolved. We keep getting failed payments from the players. This is clearly a problem with Facebook servers that handle payment information. We need an answer from Facebook staff.
There are not any hidden ways for payment validating.
Facebook works with two alternative ways of validation:
when you user clicks on "Buy" button - FB.ui({"method": "pay" ... should be fired and your callback will receive data about current payment
in same time the Backend will receive request with payment data from Facebook Payment Service.
That error lies in how your Facebook app and server are configured.
You should check this:
If you are using Dynamic Pricing - check URL in Canvas Payments chapter and be sure your backend is sending correct response.
Check what Facebook knows about your product URL here: https://developers.facebook.com/tools/debug/ Sometimes facebook cache OLD product response - you can try to force cache clean by clicking Scrape again button. BTW: resolve all warnings here.
Canvas Payments chapter in FB app settings page should be configured correctly - try to click Test Callback Url - response should be OK
Try to make test payments and analyze client and backend logs. First of all catch client (js) response from FB.ui({"method": "pay"... and check it. Then analyze access_logs of the Backend (I don't know what are you using: it can be php-fpm, apache, nodejs, etc) - be sure the Backend correctly receives Payment Request from Facebook Payment Service and correctly process it - response status codes should be 200.
Just review again FB app_id and FB secret you typed in the Backend configuration. They should be equal to FB app settings.
If nothing helps - try to debug step-by-step requests that you are receiving from Facebook on test payments.

PayPal REST API - Redirect Error Handling

My question is simple yet I can't find any SO posts or PayPal documentation to answer it.
In the event of a PayPal user having some error being redirected after completing their checkout (internet goes out, browser crashes, they close their browser before the redirect goes through, random networking issues, etc.) How are we suppose to handle that?
I thought using the following REST API
GET /v1/payments/payment/<Payment-Id>
Would solve my problem but since the state returned from this request does not change from created to approved until the funds have been executed it is useless. In the case of having some redirect error you will not have been able to execute the funds and thus it will simply be in the created state still which does not help you.
Additionally I thought maybe PayPals IPN system used for CLASSIC API would be the answer to my problem but again it fails. The IPN system does not contain relevant information such as transaction ID which is needed to link the two systems together.
Is there no way to do automated error handling using the REST API?

FireFox Security Warning using Pay Pal v0.51

I am using the PHP Toolkit for PayPal v0.51
I have setup Pay Pal sandbox accounts and done a test to the ipn.php that comes back as working ok.
I have set the config.inc.php to suit my settings
PHP Version 5.3.3-7+squeeze15 mysql and cURL installed all is working fine.
When using with IE
everything works fine, the transaction is returned to the success.php and in the ipn_success.php
I have it updating the database with the information posted back from Pay Pal.
When using Firefox
Everything works fine till I get to the part where it returns me back to the success.php
I get a Security Warning box open up with the below information within it.
Although this page is encrypted, the information you have entered is to be sent over an unencrypted connection and could easily be read by a third party.
Are you sure you want to continue sending this information?
If I click the warning straight away I get the information posted back and the database is updated.
If I leave this warning for a few seconds, I lose all the information that is posted back to the site for the database.
How can I stop this security warning from showing when using Firefox
The website is using http and not using https so Pay Pay is posting back to a non ssl site.
This is actually a known issue with FireFox that we are currently looking into. If you would like to be notified once the issue is resolved, you can open up a ticket with PayPal's Merchant Technical Support. PPXO-7400