Cybersource creating customer payment instrument through Java SDK ; "message":"Invalid body values","details":[{"name":"type","location":"card"}]} - cybersource

refer to the sample code of cybersource I tried the same thing this is my card object
card.expirationMonth(card.getExpirationMonth());
card.expirationYear(card.getExpirationYear());
card.type(cardDTO.getCardType());
requestObj.card(card);
My flow to create customerpaymentId is ==> generate instrumentId ==> generate paymentInstrumentID ==> attached it to customerPaymentIdentifier API
Getting this error while calling customerPaymentIdentifier API
{"errors":[{"type":"invalidFields","message":"Invalid body values","details":[{"name":"type","location":"card"}]}]}
Also wanted to know can pass card details in encrypted and save those card details is it possible?
thanks in advance

Related

Receive creative name for SPONSORED_VIDEO & SPONSORED_INMAILS from LinkedIn API

Just trying to fetch the creativename for creativeTypes = SPONSORED_INMAILS AND SPONSORED_VIDEO out of the LinkedIn API but I'm only able to receive creative names of SPONSORED_STATUS_UPDATE type.
In the doc I can only read fetching data for SPONSORED_STATUS_UPDATE by using the projection variable.
https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads/account-structure/create-and-manage-creatives#sponsoredvideocreativevariables
Does anyone have an idea how to get the creativename (subject) for SPONSORED_INMAILS AND SPONSORED_VIDEO?
I know It's a little bit late but with this endpoint, you can retrieve info on a video add
https://api.linkedin.com/v2/adDirectSponsoredContents/{{videoAddReffrence Urn}}
You can find the video Add reference Urn under the endpoint
https://api.linkedin.com/v2/adCreativesV2/{{add Id}}
under the key 'reference'

Jovo with Messanger

I'm recently started to use Jovo framework to build the App for Google Home device based on Dialogflow. The app is working fine. Now decided to do the integration with Facebook Messenger via Dialogflow. It's working fine. I can trigger the bot to start from the Messenger plus can see the output and so on but have two questions:
the output in FB messenger looks like this: [speak]Some text inside[/speak],
can we remove the SSML tags from the output, is there a way to strip
those tags before tell() or ask() methods are triggered, I have tried
using the this.googleAction().setResponseObject() method, have
checked how to response JSON looks like and then created the object
to pass with the property fulfillmentText, where I removed those
tags, it works that way but this is not efficient and looking for sth simpler
is there a method to use, sth like setResponseObject() but without alexaSkill() or googleAction "prefix" obj, where we can prepare a custom object so we can send custom JSON response. I'm asking cause I want to use FB Messenger specific output like buttons: https://developers.facebook.com/docs/messenger-platform/send-messages/buttons. Is this is possible using JOVO
Since the release of Jovo v2.1 (read the announcement here), you can build Facebook Messenger chatbots with Jovo using Dialogflow Integrations.
Regarding your questions:
1) This is fixed with the latest update
2) You can set custom payloads with the new this.$dialogflow.setCustomPayload('facebook', payload) helper method

Bosun: Save Information using post url and the get the same information and use it in template

We have a notification which will post data to an application using the application end point.
notification ABC{
post = savedetailsurl
body = {{.|json}}
useBody = true
}
So the end point will save all the details in mysql DB.
Now in our template we call another end point to get the details which we saved using the webhook in notification.
template ABC {
use the " getDetailsUrl" and use the details in forming the email
}
Now the problem is race condition. Sometimes the details are not saved yet in the backend (mysql), and getDetailsUrl is called. So we get the empty result.
Is there are way to solve the race condition.
Bosun's notification system is designed to be very basic. If you want something more advanced you will need to use a separate system to generate the notification details and/or handle the alert workflow. Some people have used pagerduty or other monitoring systems like Shinken to do more advanced notifications or alert management.
Your best bet is to skip the built in notifications and do everything in a external system. You can still use the http://bosun.org/api to integrate with the various alert states (crit/warn/ack/close/etc) or you can change your alerts to use log = true to bypass all the built in states and create your own workflow.

How to display the output that Microsoft Graph API returns

In running the graph API that is given as sample: https://graph.microsoft.com/v1.0/me/, it returns an output in the screen
What info is it returning and how can I use it in a user interface....
The easiest way to see what info is returned and try out different calls is to use the Graph Explorer at https://graph.microsoft.io/en-us/graph-explorer.
Otherwise, check the documentation at https://graph.microsoft.io/en-us/docs.
That API endpoint (https://graph.microsoft.com/v1.0/me/) return the user profile.
Here is the detail: https://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/user_get
You can use the information however you wish on your client (e.g., display list of current licenses, display user information for confirmation and updates, etc.). Other user-related methods are here: https://graph.microsoft.io/en-us/docs/api-reference/v1.0/resources/user

how to use telegram API codes?

i registered in https://my.telegram.org/apps and got api_hash and api_id and public key ,now i want to use this function https://core.telegram.org/method/auth.sendCode
auth.sentCode#efed51d9 phone_registered:Bool phone_code_hash:string send_call_timeout:int is_password:Bool = auth.SentCode;
auth.sentAppCode#e325edcf phone_registered:Bool phone_code_hash:string send_call_timeout:int is_password:Bool = auth.SentCode;
---functions---
auth.sendCode#768d5f4d phone_number:string sms_type:int api_id:int api_hash:string lang_code:string = auth.SentCode;
Query example
(auth.sendCode "79991234567" 1 32 "test-hash" "en")
=
(auth.sentCode
phone_registered:(boolFalse)
phone_code_hash:"2dc02d2cda9e615c84"
)
d16ff372 3939370b 33323139 37363534 00000001 00000020 73657409 61682d74 00006873 e77e812d
=
2215bcbd bc799737 63643212 32643230 39616463 35313665 00343863 e12b7901
how can i use this query example?
and what is this binaries? ==> "d16ff372 3939370b 33323139 ...."
You can't directly start to send queries to Telegram. Creating api_hash and api_id is a basic step to start with Telegram API. Hope you know that Telegram uses its own protocol called 'MTProto'. You can get the detailed discription in Telegram's official website.
As per Telegram Protocol, the Client and Server shares the 'Authorization Key' (which is used for encryption and decryption) using Diffie-Hellman algorithm. For sample please see https://core.telegram.org/mtproto/samples-auth_key. After creating the authorization key successfully, we can start to call Telegram APIs which is called as RPC queries.
You can also refer https://github.com/ex3ndr/telegram-api for implementation.
The hexadecimal data in the example is nothing but the query made by following the algorithm.
You need to start from making a valid Telegram AuthKey.
The patterns and functions you build up along the way while doing this will help you towards building the rest of your Telegram API.
You can start with this here: https://stackoverflow.com/a/32809138/44080
And them work up, step by step until you have the AuthKey as described in these links
https://core.telegram.org/mtproto/auth_key
https://core.telegram.org/mtproto/samples-auth_key
Part of the problem you will initially face is the documentation.
Working through this step by step and getting familiar with the authors writing style is a big help too.

Resources