Facebook local currency error_code: 1383003 - javascript

While trying to test local currency payment I see this error on javascript pay dialog callback:
{"error_code":1383003,"error_message":"Account id missing. sender: 235265828 receiver: 0"}
In facebook dialog I see this:
Sorry, but we're having trouble processing your payment. You have not been charged for this transaction. Please try again.
og:product object is correct (tested by Facebook Object Debugger), payments enabled, company for payments registered and selected, realtime updates script also selected and working.
I have no any ideas what to do. I found only one similar question with solution to set company for payments. And I tried to test payment by different users with different roles (developer, testers, administrators). Also in facebook error list I saw meager description for error 1383003:
1383003 - PaymentFailure - Processor decline.

It sounds like you don't have a company setup. That will definitely cause this error, try adding a tax ID in the company and see if you still get this issue.

Related

Office add-in for Outlook - Sometimes the sender's email address becomes LegacyExchangeDN

I am currently developing an Office add-in for Outlook.
If you use the following method to get the sender's email address when composing a mail, in rare cases the emailAddress property will be set to the value of LegacyExchangeDN instead of the email address.
Office.From interface
The following is an example of an object when it becomes a LegacyExchangeDN (some parts are hidden).
{displayName: "XXXXXXXX", emailAddress:"/O=EXCHANGELABS/OU=EXCHANGE ADMINISTRATIVE GROUP (XXXXXXXXXXXXXXXX)/CN=RECIPIENTS/CN=XXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXX"}
We do not know the conditions under which this happens.
Can you please tell me the cause of this problem and how to solve it?
We're using Office 365(Microsoft 365).
This is very similar to office-js issue # 1250. This behavior can be reproduced by re-sending a previously sent message and then calling Office.context.mailbox.item.from.getAsync. There may be other ways to reproduce this behavior. We have an internal work item tracking this issue, however, we don't have any timelines about it at the moment.

How to know if Paypal transaction was successful using the API?

I try to integrate PayPal into my checkout process. Here is what I did:
I managed to use the Paypal API Node SDK to create payments with PayPal.payment.create.
and then redirecting the user to the payment URL I get in the response to links[1].href which is something like this: "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-00N000849T505604G".
On that page I sing in with my sandbox user and pay the transaction, I get redirected to my custom success page I declared when creating the payment.
On my Success Page, I want now to check if the transaction really was successful to update my database, so I call my backend, that calls a GET to the transaction to the links[0].href which is something like https://api.sandbox.paypal.com/v1/payments/payment/PAY-1VL72645VS000000XLLARPMI to check for the status.
Unfortunately, the state property of the response is always created.
What am I doing wrong? How can I check it? I was using these docs as a reference.
Generally, I’m a bit overwhelmed by the number of docs and not sure which one is correct and could not find any concise tutorial :S
Thanks for your help!
State property of the response is created is the current one.
The state property's possible values created, approved, failed.
created. The transaction was successfully created.
approved. The customer approved the transaction.
failed. The transaction request failed.
but approved. should be The buyer( not customer) approved the transaction.
You can get this from Payment.php file in line #376 of PayPal-PHP-SDK project.
https://github.com/paypal/PayPal-PHP-SDK/blob/master/lib/PayPal/Api/Payment.php
At first State property will created but it will be approved when The buyer approved the transaction using Update payment then you can check List payments /Show payment details then you will found payment is now approved.
For Update payment
https://developer.paypal.com/docs/api/payments/#payment_update
and Show payment details https://developer.paypal.com/docs/api/payments/#payment_get

Log In with PayPal button JavaScript code builder validation error

Sorry for the basic questions but as a very first step I'm just trying to test the "Log In with PayPal button JavaScript code builder".
I've created an app, gone to this button builder, set the return URL to my localhost and then as that failed to a public website (http://bbc.com) making the same settings on my app details page but whatever I do when clicking the button I get the following error:
"Relying Party Validation error: redirect_uri provided in the request does not match with the registered redirect_uri. Please check the request."
I've tried setting the button up for sandbox and production but both fail.
Has anyone had the same issue? I'm guessing I'm doing something really stupid. I'm just taking the "Dynamically generated JavaScript" code and adding it to an empty webpage.
Thanks.
Turns out it takes a while (a few hours) for the PayPal API to update to changes in the admin console. Changes were reflected after several hours, very unhelpful for testing. That was using the production option. Even when return_uri was being recognised as correct the scope settings were invalid despite selecting all the correct options.

How to check failed recurring subscription Stripe

How should I design an on-login middleware that checks if the recurring subscription has failed ? I know that Stripe fires events when things happen, and that the best practice is webhooks. The problem is, I can't use webhooks in the current implementation, so I have to check when the user logs in.
The Right Answer:
As you're already aware, webhooks.
I'm not sure what you're doing that webhooks aren't an option in the current implementation: they're just a POST to a publicly-available URL, the same as any end-user request. If you can implement anything else in Node, you can implement webhook support.
Implementing webhooks is not an all-or-nothing proposition; if you only want to track delinquent payments, you only have to implement processing for one webhook event.
The This Has To Work Right Now, Customer Experience Be Damned Answer:
A retrieved Stripe Customer object contains a delinquent field. This field will be set to true if the latest invoice charge has failed.
N.B. This call may take several seconds—sometimes into the double digits—to complete, during which time your site will appear to have ceased functioning to your users. If you have a large userbase or short login sessions, you may also exceed your Stripe API rate limit.
I actually wrote the Stripe support team an email complaining about this issue (the need to loop through every invoice or customer if you're trying to pull out delinquent entries) and it appears that you can actually do this without webhooks or wasteful loops... it's just that the filtering functionality is undocumented. The current documentation shows that you can only modify queries of customers or invoices by count, created (date), and offset... but if you pass in other parameters the Stripe API will actually try to understand the query, so the cURL request:
https://api.stripe.com/v1/invoices?closed=false&count=100&offset=0
will look for only open invoices.... you can also pass a delinquent=true parameter in when looking for delinquent customers. I've only tested this in PHP, so returning delinquent customers looks like this:
Stripe_Customer::all(array(
"delinquent" => true
));
But I believe this should work in Node.js:
stripe.customers.list(
{delinquent:true},
function(err, customers) {
// asynchronously called
});
The big caveat here is that because this filtering is undocumented it could be changed without notice... but given how obvious the approach is, I'd guess that it's pretty safe.

Facebook Feed Dialog: Post not showing up on friend's wall even though I get a response id

I am creating an app on facebook and I am trying to post to a friend's wall. I'm using the facebook javascript SDK and the FB.ui method to do this. In short here is my code:
function test() {
var obj = {
method: 'feed',
to: '######'
};
function callback(response) {
alert(response['post_id']);
}
FB.ui(obj, callback);
}
Note that I made this code very simple for testing purposes.
When I run it, a facebook feed dialog opens correctly and at the top says "Post Story to friendsname's Wall". I type in a message and press Share. My alert pops up with a response['post_id'] number. Because there is a response['post_id'] the story should've been posted successfully right? However when I navigate to the friend's wall there is no story. I've tried this multiple times in slightly different ways and haven't been able to get it to work. If I remove the 'to' parameter and simply post to my own wall it -does- work. So for some reason, posting to a friend's wall breaks it?
I know it's a rather broad question but I was wondering if anybody had any ideas why this doesn't work. Thanks
I suspect the problem may be because your application is in sandbox mode - https://developers.facebook.com/docs/ApplicationSecurity/
When testing your apps, place them into Sandbox Mode. This hides your
app entirely from all users who you have not authorized in the
developer app to see the app, for the roles described below. Please
note that when your app is in Sandbox Mode, you cannot call any API
calls on behalf of users who cannot see your app.
Basically, if your application is in sandbox mode, nothing your application does can be seen by users who have not authorized your application or by users that have not been specifically listed in the "roles" within your applications settings.
Remove you application from sandbox mode or add some users to specific "roles" within your application.

Categories

Resources