Facebook Payments Asynchronous Testing - facebook

I am trying to test Facebook Canvas Payments within my Unity game, more specifically, asynchronous payment methods, however there seems to be a problem. Whenever I get to the Asynchronous Payment debug screen where you can select what sort of resolution to receive (This thing) the browser is giving me an error "TypeError: window.parent.require(...) is undefined" in Firefox and "Unable to get property 'processIFrame' of undefined or null reference" in IE.
Anybody got any ideas/ways to fix this?

This is a known bug, that is currently being tracked here: https://developers.facebook.com/bugs/1457965634504096/

Related

How to simulate and debug PAYER_ACTION_REQUIRED?

we are integrating the Paypal-API for Paypal-Checkout and came about the possebility that Paypal might return a PAYER_ACTION_REQUIRED-error (see https://developer.paypal.com/docs/api/orders/v2/#error-PAYER_ACTION_REQUIRED).
We now want to see if our understanding and implemented handling of this error is correct, but we couldn't find a way to provoke this error intentionally in the sandbox to debug our code. How is it done?
We tried to use a card-number from this page:
https://developer.paypal.com/tools/sandbox/card-testing/#rejection-triggers
and tried to use a "rejection trigger", but either we get "the name contains invalid characters"- or "the credit-card data is not valid"-messages, but the Paypal-Window is never leaved so none of these errors hits our code.
Any ideas?
See the guide for integrating 3D Secure, which is what returns this status. It's particularly necessary for processing cards from Europe with an Advanced Credit and Debit Cards integration.
If you are using the Standard integration, you do not need to be concerned about 3DS as it's taken care of by PayPal.

How can I make a proper facebook payment in unity3d webGL?

I am trying to make unity webgl game. I'm currently working with my own python django server. But there's few problems I am confronting right now.
First, when client completes the payment behavior, it repeatedly shows javascript error. Here's the error code:
Invoking error handler due to
Uncaught abort(219) at Error
at jsStackTrace (lottery.wasm.framework.unityweb:8:22313)
at stackTrace [Object.stackTrace] (lottery.wasm.framework.unityweb:8:22484)
at Object.onAbort (https:/lottery-server.ntucorp.com/static/game/Build/UnityLoader.js:4:11047)
at abort ('lottery.wasm.framework.unityweb:8:521824')
at wasm-function[62206]:0x1143303
at wasm-function[25973]:0x9c45e6
at wasm-function[61403]:0x111d42f
at wasm-function[27992]:0xa2a9df
at wasm-function[50781]:0xeabcd7
at wasm-function[35699]:0xba8a56
at wasm-function[35698]:0xba8997
at wasm-function[35744]:0xbaa780
at wasm-function[26171]:0x9c9232
at wasm-function[35758]:0xbab0e3
at wasm-function[26171]:0x9c9232
at wasm-function[35768]:0xbab37e
at wasm-function[23663]:0x9815d2
at wasm-function[61943]:0x11424be
at dynCall_iiiii [Object.dynCall_iiiii] (lottery.wasm.framework.unityweb:8:494571)
at invoke_iiiii (lottery.wasm.framework.unityweb:8:362010)
at wasm-function[59810]:0x10db82f
at wasm-function[59101]:0x10b9e40
at wasm-function[4047]:0x197f91
at wasm-function[4046]:0x197ebf
at wasm-function[7537]:0x2c346b
at wasm-function[7534]:0x2c283b
at wasm-function[11356]:0x483dc2
at wasm-function[9973]:0x3cab31
at blob:https:/lottery-server.ntucorp.com/d6308b13-98d3-4a85-abfd-0c7db365fcfd:8:438788
at ccall [Object.ccall] (lottery.wasm.framework.unityweb:8:16382)
at SendMessage (lottery.wasm.framework.unityweb:8:9099)
at sendMessage [Object.sendMessage] (lottery.wasm.framework.unityweb:8:48724)
at uiCallback (lottery.wasm.framework.unityweb:8:50342)
at a.__wrapper.a.__wrapper (https:/connect.facebook.net/en_US/sdk.js?hash=11641b2e4a5fab828e74fff5f206cf37&ua=modern_es6:93:765)
at Object.cb (https:/connect.facebook.net/en_US/sdk.js?hash=11641b2e4a5fab828e74fff5f206cf37&ua=modern_es6:145:4420)
at c (https:/connect.facebook.net/en_US/sdk.js?hash=11641b2e4a5fab828e74fff5f206cf37&ua=modern_es6:145:10332)
at a.c.read (https:/connect.facebook.net/en_US/sdk.js?hash=11641b2e4a5fab828e74fff5f206cf37&ua=modern_es6:125:737)
at a._processor (https:/connect.facebook.net/en_US/sdk.js?hash=11641b2e4a5fab828e74fff5f206cf37&ua=modern_es6:127:283)
at a.b.enqueue (https:/connect.facebook.net/en_US/sdk.js?hash=11641b2e4a5fab828e74fff5f206cf37&ua=modern_es6:126:711)
at Object.u [as onMessage] (https:/connect.facebook.net/en_US/sdk.js?hash=11641b2e4a5fab828e74fff5f206cf37&ua=modern_es6:143:2477)
at https:/connect.facebook.net/en_US/sdk.js?hash=11641b2e4a5fab828e74fff5f206cf37&ua=modern_es6:136:2925
at https:/connect.facebook.net/en_US/sdk.js?hash=11641b2e4a5fab828e74fff5f206cf37&ua=modern_es6:50:208'''
I'm using Unity Facebook SDK, so in unity c# script I call this function.
FB.Canvas.Pay(
product_url,
quantity:1,
callback:ProductCallback
);
And, anyway it gives callback function back, and the response of this callback is this.
PayResponse:{"callback_id":"4","response":{"payment_id":1794879660642720,"amount":"2.99","currency":"USD","quantity":"1","request_id":"","status":"initiated","signed_request":"r4_00GLFbodYSMVeVGfFcfuzIr1HQKd9EYiO_OM0eXM.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImFtb3VudCI6IjIuOTkiLCJjdXJyZW5jeSI6IlVTRCIsImlzc3VlZF9hdCI6MTU3ODA0MzI2OCwicGF5bWVudF9pZCI6MTc5NDg3OTY2MDY0MjcyMCwicXVhbnRpdHkiOiIxIiwicmVxdWVzdF9pZCI6IiIsInN0YXR1cyI6ImluaXRpYXRlZCJ9"}}
And secondly I cannot make Facebook Unity SDK workable, which is FB.Canvas.PayWithProductID. It just don't work, It just omits javascript error (UnityLoader.js error which is similar to one which I already mentioned), and also it do not give callback.
Also In document, https://developers.facebook.com/docs/games_payments/payments_lite?locale=ko_KR In here it says proper code would be FB.PayWithProductID, but Facebook SDK does not have any FB.PayWithProductID. All it have is FB**.Canvas.**PayWithProductID.
How can I get proper callback from facebook? I cannot get any kind of callback parameters. All I recieve is that the fact facebook called my callback url, not containing any GET parameters. I just return request.GET.get('hub.challenge'), but anyway it is still None.
Why does it happen? please help.
This is a very broad question as it includes so much into this. I would recommend connecting your project to API and then call Facebooks API to take payments. Here is the documentation: https://developers.facebook.com/docs/graph-api/reference/v5.0/payment
I am only saying this because there is not a lot of context here as to how and where you're calling the payment method from. Are you already doing this from an API? or are you trying achieve this from the engine itself?
Here is an extremely useful guide on how you can call an API from unity:
https://www.red-gate.com/simple-talk/dotnet/c-programming/calling-restful-apis-unity3d/
I would highly recommend you do this API side as it safer than doing it through the engine, if that's what you are doing.

Unknown Facebook API Error 1383066

I'm developing Facebook payment interface for my game. I did everything as described in documentation. And I came to the strange situation where "Asynchronous Payment Method" works just fine (I see callback calls to my server) but immediate "Test Payment Method" doesn't work (I do not see callback call to my server). Instead FB.ui call returns this error:
{
error_code: 1383066,
error_message: "Something went wrong while processing your payment…harged for this transaction, so please try again."
}
Here is a screenshot with error: http://monosnap.com/image/DetZ1VqEy1d7yuiVXdJLUZdL1Ukl45
Can anyone help?
p.s. I searched in Internet ant there is no information about FB API Error 1383066
Problem just gone by itself. I think that it was an issue on FB side and they just fixed it.

ref=ts on facebook app url cause app not found error

I've create an facebook app and it run smoothly at
https://apps.facebook.com/icoloringstar/
But the problem is: when I search my app name "icoloring star" in facebook, it link to the app at url:
https://apps.facebook.com/icoloringstar/?fb_source=search&ref=ts
Then facebook said that:
App "iColoring Star" is unavailable
The app "iColoring Star" is temporarily unavailable due to an issue with its third-party developer. We are investigating the situation and apologize for any inconvenience.
We found that url part "ref=ts" cause above problem, but really do not know why?
Could you explain me why and how to resolve this problem?
Thank you very much.
It sounds like your code is failing when the ref parameter is supplied in the request path.
I was able to repro this with any arbitrary value in the ref parameter when accessing your app
Check your server logs and and see if you're returning a 500 error to facebook when the request comes in
See if you have any code that parses a ref parameter and check it's not throwing exceptions
Make sure your callback URL in the app settings doesn't also specify a ref parameter or your app may receive two values and/or fail entirely
It means 'Top Search'. User enter a query into the top of search.
There are some ref parameters.. ref=bookmarks for example. I dont know the full list.
Did you put your app on Facebook App Center?

Paypal shows old version error on express check out , I got my page run first but now shows this error

I doing paypal express checkout in jsp on sandbox with out using the sdk I am getting the ACK as sucess when generating the token after that when i redirected to sandbox now it shows error message on sandbox as
You have requested an outdated version of PayPal. This error often results from the use of bookmarks.
This is the Ack response i got
TOKEN=EC%2d5PT30649GD612951T&TIMESTAMP=2012%2d03%2d04T16%3a44%3a18Z&CORRELATIONID=4ed0e9de9ec8a&ACK=Success&VERSION=84%2e0&BUILD=2571254
I decoded the response using URLDecoder and redirected to the sandbox
if (ack.equals("Success")) { String logurl = "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=express-checkout&token="+token;
response.sendRedirect(logurl);
}
Thanks in advance for any suggestions and answers
If you are receiving this error, it is best to check the url you are redirecting.
Documentation says that the URL is
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout
Careful with the _express-checkout part. If you are using an ide (like Visual Studio) that marks the urls as links, you might think that it is a space (as it becomes invisible) and at the first error you encounter, you might delete the underscore char.
I got it working and I am answering because i found many one have same error This error occurs mainly due to any of the samll errors or changes in your NVP if you are using it.
I think This link will be helps , deals with "You have requested an outdated version of PayPal"