Where to find paykey for an order in woocommerce for adaptive payments? - paypal

I created a sandbox app for my ecommerce website. I placed many orders with paypal payments. But i am not getting paykey associated with the orders, i am only getting transation id. I want to get paykey for a particular order, so if i want to refund to that order i can use that paykey for that. Where have i found that paykey associated with each order. I am using adaptive paypal payments refund api and i need paykey to refund for an order. The code is below in which i need paykey
curl https://svcs.sandbox.paypal.com/AdaptivePayments/Refund \
-s \
--insecure \
-H "X-PAYPAL-SECURITY-USERID: api_username" \
-H "X-PAYPAL-SECURITY-PASSWORD: api_password" \
-H "X-PAYPAL-SECURITY-SIGNATURE: api_signature" \
-H "X-PAYPAL-REQUEST-DATA-FORMAT: NV" \
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: NV" \
-H "X-PAYPAL-APPLICATION-ID: your_app_id " \
-d requestEnvelope.errorLanguage=en_US \
-d payKey="where to find"
so can anyone tell me why i am not getting paykey for an order ?

The pay key comes back in the response to the Pay request sent to PayPal. Whatever plugin or code you're using for the checkout should be saving that for you in a session, in the database, or somewhere. You'd need to track that down and make sure it's getting saved in the DB so that you can pull it when you need to.

Orders stored in wp_posts table where the post_type = shop_order.
But that only stores the basic info as Order's Title and Date with an "ID".
All the details of that order stored in wp_postmeta table using that post_id of the order. So we can search in wp_postmeta table using order id like post_id='123456' . There a paykey stored in there.

Related

Keycloak bulk user import

Does anyone have any thoughts on how one might import a very large number of users into Keycloak.
We are in the process of upgrading from 2.5.5 to 4.0.0 and have had to switch from MongoDB to MySQL. We have been able to export our user base but with 280k+ users to import back into Keycloak. The import process takes 25 mins to import one file of 500 users, which doesnt really seem practical as that would take us approximately 9/10 days to import the user base if we were working 24/7.
Any thoughts or ideas would be appreciated.
I realize I'm a little late to the party here...
Keycloak 8 (and newer) has a mechanism for bulk importing users via a .json file: https://www.keycloak.org/docs/8.0/server_admin/index.html#_export_import
If you have some sort of mechanism for dumping your existing users to a .json file, it makes the import reasonably easy.
You can use the Keycloak REST API with partialImport
First, you need to get an access_token, you can use your admin user or a client with the role manage-realm assigned
access_token=`curl http://localhost:8080/auth/realms/my-realm/protocol/openid-connect/token -XPOST -d 'grant_type=client_credentials' -u 'admin-client:admin-secret' | jq -r .access_token`
Then you can import an array of users
curl -X POST -H "Authorization: Bearer $access_token" -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{"users":[{"username":"jose.perez","email":"jose.perez#gmail.com","firstName":"Jose","lastName":"Perez","emailVerified":true,"enabled":true,"ifResourceExists":"SKIP"}' http://localhost:8080/auth/admin/realms/my-realm/partialImport

Does Coverity have Rest API

I want to store results from Coverity® to InfluxDB and I was wondering does Coverity have REST API?
If you're only trying to dump data to InfluxDB, you can curl data from REST API and insert resulting json to the database. I do something similar, but in CSV format.
Create a view in coverity 'Issues: By Snapshot' that contains all your defects.
Curl data from coverity view
json format
curl --user <userid>:<password>
"http://<coverity_url>/api/viewContents/issues/v1/<View Name>?projectId=<project ID>&rowCount=-1"
csv format
curl --header "Accept: text/csv" --user <userid>:<password>
"http://<coverity_url>/api/viewContents/issues/v1/<View Name>?projectId=<project ID>&rowCount=-1"
Example:
If you created a view 'My Defects' in project 'My Project' the command would be
curl --user <userid>:<password> "http://<coverity_url>/api/viewContents/issues/v1/My%20Defects?projectId=My%20Project&rowCount=-1"
In above URL:
%20 -- URL encoded space
rowcount=-1 -- Download all rows in view. You can set it to desired limit.
Not really, no.
There is a very limited REST api but it only covers a few very specific things. I'd recommend you use cov-manage-im where you can and only use the SOAP API if you need something more.
cov-manage-im can help, it can be used to retrive defects for specific projects and streams. cov-manage-im --help can give you more info
cov-manage-im --host youcovhostname --user yourusername --password yourpassword --mode defects --show --project yourprojectname

Getting an error when I run a V().has() gremlin query against IBM Graph service on bluemix

I created an instance of IBM Graph service on bluemix and created some vertexes. When I try to issue a gremlin query to find one of the vertexes I created, I get an "Internal Error".
Here's the query I'm using
Create the Vertex
curl -u username-password -H 'Content-Type: application/json' -d '{ "label":"movie","properties":{"Name": "Million Dollar Baby","Type": "Movie"} }' -X POST "http://../g/vertices"
Reponse
{"requestId":"07f29cea-25b3-4305-b74b-540466206872","status":{"message":"","code":200,"attributes":{}},"result":{"data":[{"id":8336,"label":"movie","type":"vertex","properties":{"Type":[{"id":"36a-6fk-1l1","value":"Movie"}],"Name":[{"id":"2s2-6fk-sl","value":"Million Dollar Baby"}]}}],"meta":{}}}
Query whether the vertex has a Type property 'movie'
curl -u username-password -H 'Content-Type: application/json' -d '{"gremlin": "def g = graph.traversal(); g.V().has('Type','movie')"}' -X POST "http://../g/gremlin"
Response (Error)
{"code":"InternalError","message":""}
IBM Graph requires users to create indexes for any property that they are going to issue queries against. In this case 'Type' is a property and is included in a gremlin query.
You need to create an index using the /schema endpoint which is provided by the IBM Graph service in bluemix.
An example of this is provided in the Service Getting Started guide
http://ibm-graph-docs.ng.bluemix.net/gettingstarted.html

parse.com REST API is not returning all of the properties for one of my classes

I've been using Parse from an iOS app and wanted to fetch some of the data from a web app using the REST API. Following the docs, I tried this on the command line:
url -X GET -H "X-Parse-Application-Id: MYAPPID"
-H "X-Parse-REST-API-Key: MYAPIKEY"
-G --data-urlencode 'limit=1'
https://api.parse.com/1/classes/MyClass
However, it isn't returning properties for all of the columns in my parse app.
What could be happening? It's possible there is some configuration in Parse, but I can't find it. There are no special security settings for that table.
I figured this out myself. The default query returns the oldest records first. I believe some columns were added later, and there must be no data in the early records. When I request the data ordered by most recent first, then I see all of the columns:
url -X GET -H "X-Parse-Application-Id: MYAPPID"
-H "X-Parse-REST-API-Key: MYAPIKEY"
-G --data-urlencode 'limit=1'
--data-urlencode 'order=-createdAt'
https://api.parse.com/1/classes/MyClass

"The user to send to could not be found" when using API, using an e-mail identifier

for example this query:
curl -H "Content-Type: application/json" \
-d '{"oauth_token": "...","pin": "....","destinationId": "reflector#dwolla.com","amount":"0.5","fundsSource":"..."}' \
https://www.dwolla.com/oauth/rest/transactions/send
returns the following error:
"Success":false,"Message":"The user to send to could not be found.","Response":null
I also tried with a confirmed user account. I can send money using a dwolla number ID, but when using an e-mail I see the error The user to send to could not be found.
Why is this happening?
You need to specify the "destinationType" if "destinationId" is anything other than a Dwolla account key.
Possible values: 'Dwolla', 'Facebook', 'Twitter', 'Email', 'Phone'
Defaults to: 'Dwolla'