Cybersource capture through CIS payment - sap-commerce-cloud

How can I send a capture request to cybersource using hybris CIS payment. Below is the method I am using but it is giving me 102 as response code with reply message as
The following request field(s) is either invalid or missing: auth_request_id
I am able to see the capture request when I login to EBCtest but it does not have any details.
Below is the code which I am using, trying to capture the amount by hard coding the amount, transaction id and authorization ids
CisPaymentRequest cisPaymentRequest=new CisPaymentRequest();
//cisPaymentRequest.setParameters(new AnnotationHashMap(getAnnotationHashMap()));
cisPaymentRequest.setAmount(new BigDecimal(58.55));
cisPaymentRequest.setCurrency("USD");
final CisPaymentTransactionResult captureResult = getCisClientPaymentService().capture(CLIENT_REF, "single",new URI("https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor?auth_request_id=831000"),"D99OZS1FU15J", cisPaymentRequest);

The authorization request ID you are sending is invalid: auth_request_id=831000
Here is an example of a valid authorization request ID: 5499176942776634304004
The authorization request ID is returned by CyberSource in the response to an authorization request.

Here is how it got resolved-
I changed the url and corrected the transaction id
Authorization ID
OLD - https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor?auth_request_id=831000
Correct- https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/831000
Transaction id
OLD - D99OZS1FU15J
Correct - 5512968196316020204007
CisPaymentRequest cisPaymentRequest=new CisPaymentRequest();
//cisPaymentRequest.setParameters(new AnnotationHashMap(getAnnotationHashMap()));
cisPaymentRequest.setAmount(new BigDecimal(58.55));
cisPaymentRequest.setCurrency("USD");
final CisPaymentTransactionResult captureResult = getCisClientPaymentService().capture(CLIENT_REF, "single",new URI("https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/831000"),"5512968196316020204007", cisPaymentRequest);

Related

How to make a HTTP Basic Authentication post request where password is generated by TOTP in node js

I have successfully completed the other parts of the challenge and am stuck on submitting the request.
please can anyone help me in making a POST request so that i can send in my solution. it's been a real struggle trust me.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
The submission has to follow these rules:
Build your solution request
First, construct a JSON string like below:
{
"github_url": "https://github.com/YOUR_ACCOUNT/GITHUB_REPOSITORY",
"contact_email": "YOUR_EMAIL"
}
Fill in your email address for YOUR_EMAIL, and the private Github
repository with your solution in YOUR_ACCOUNT/GITHUB_REPOSITORY.
Then, make an HTTP POST request to the following URL with the JSON
string as the body part.
CHALLENGE_URL
Content type
The Content-Type: of the request must be application/json.
Authorization
The URL is protected by HTTP Basic Authentication, which is explained
on Chapter 2 of RFC2617, so you have to provide an Authorization:
header field in your POST request.
For the userid of HTTP Basic Authentication, use the same email address you put in the JSON string.
For the password , provide a 10-digit time-based one time password conforming to RFC6238 TOTP.
Authorization password
For generating the TOTP password, you will need to use the following
setup:
You have to generate a correct TOTP password according to RFC6238
TOTP's Time Step X is 30 seconds. T0 is 0.
Use HMAC-SHA-512 for the hash function, instead of the default HMAC-SHA-1.
Token shared secret is the userid followed by ASCII string value "APICHALLENGE" (not including double quotations).
Shared secret examples
For example, if the userid is "email#example.com", the token shared
secret is "email#example.comAPICHALLENGE" (without quotes).
If your POST request succeeds, the server returns HTTP status code 200
.

Why would an Acumatica API action work correctly in Postman, but not work in .NET (although it reports success)?

I'm calling the Shipment/ConfirmShipment endpoint, and it's returning success in both .NET and Postman, but using Postman the shipment actually gets confirmed, while in .NET it doesn't.
In Postman, I'm doing a POST with the body containing JSON for the shipment number:
{"entity":{"ShipmentNbr":{"value":"022025"}}}
In .NET, I'm doing a HttpClient.PostAsync() to the same URL and with the same JSON as above. They both return success with a 202 Accepted response. However, as I mentioned, the Postman call confirms the shipment (Confirm = 1, Status = F), but in .NET, the POST doesn't actually confirm the shipment. Any ideas of what might be preventing it?
API v17.200.001
The status 202 Accepted might be a bit confusing but it does not mean that the action has completed succefully.
It only means that the execution request is valid and has been accepted by the system.
If you want to monitor the status of the Action itself you will need to use the address given in the header of the 202 Accepted response (the Location header)
So in my example that follows, you can see that my action has been accepted and that when I request the status of the operation I then get the 204 No Content which is the Success response.
Here I have requested the execution of the Confirm Shipment action and it has been accepted and I can see the url where I can fetch the status of the action
Here I have requested the status of the the action and can see the successful result
You can find more information here about the execution of an action through the REST API.
I recommend taking a look at the response section.
https://help-2017r2.acumatica.com/(W(1))/Main?ScreenId=ShowWiki&pageid=91bf9106-062a-47a8-be1f-b48517a54324
Here is more information about the 202 and the 204 http response:
https://httpstatuses.com/202
https://httpstatuses.com/204

Body of response with statuscode 401

I'm trying to enable some kind of "voice unlinking" (which should remove the access token from the google assistant) for my google action. I'm using the webhook fulfillment via Dialogflow and I'd like to send a response text like "Okay, your account linking got removed."
To do so, I'm currently trying to send a response using the status code 401, but it seems that my response body gets either ignored by the assistant or filtered along the way.
So my question is:
Is there a way to add any body information to a response with status code 401 or are there other ways to achieve the removing of access tokens via response?

Product API Error for Amazon France Items

I try to get information about items using Amazon Product API (for example http://webservices.amazon.com/scratchpad/index.html# ).
There is no problem for items from amazon.com(US), but for some items from amazon.fr, amazon.de API returns:
Error! AWS.InvalidParameterValue HTTP Status 200: Success B01B8E8OP4
is not a valid value for ItemId. Please change this value and retry
your request.
But https://www.amazon.fr/Ravensburger-24011-Jeu-Educatif-Colorino/dp/B01B8E8OP4/ref=lp_10946356031_1_1?s=toys&ie=UTF8&qid=1515158225&sr=1-1 is present.
I have registration as associate at amazon.fr and use appropriate associate tag.
For amazon.de:
Error! AWS.InvalidParameterValue HTTP Status 200: Success B014FSAOYE
is not a valid value for ItemId. Please change this value and retry
your request.
but https://www.amazon.de/dp/B014FSAOYE/ref=sspa_dk_detail_5?psc=1
What do you think about it?
It's because different API endpoins for each location https://docs.aws.amazon.com/AWSECommerceService/latest/DG/Locales.html
And enpoind URL for request must be:
https://webservices.amazon.fr/onca/xml

user can not sign because there’s no URL created and sent to us from Docusign

We are receiving the following error when I try to create a recipient view. Basically the document is sent to 2 users, one of them has already signed but the other user can not sign because there’s no URL created and sent to us from Docusign. We are using node.js docusign sdk.
var recipientView = new docusign.RecipientViewRequest();
recipientView.setReturnUrl();
recipientView.setUserName();
recipientView.setEmail(;
recipientView.setAuthenticationMethod("email");
recipientView.setClientUserId();
var envelopesApi = new docusign.EnvelopesApi();
envelopesApi.createRecipientView(accountId, envelope.id, recipientView,
function(error, viewUrl, response) {
// no url is returned here.the error (in the image) is shown
});
I printed the values of accountId, envelopeId and those seemed to be fine.I checked if the user had changed his first name, last name and there were no errors there. If I create a new user from scratch everything works fine.
FrontEnd Error
Response Error
Through your screenshots it looks like you are getting an UKNOWN_ENVELOPE_RECIPIENT error returned from the API. This means the recipient data you are sending to identify the recipient is not correct. It needs to exactly match the data you assigned to the recipient when you added them to the envelope, such as name, email, recipientId, and clientUserId.
Try calling the EnvelopeRecipients: List API before you make the request to generate the URL and ensure that the recipient data matches what you are sending in your createRecipientView() request. That should help identify which piece of data is off, once you correct that the call will then start returning the proper URL.
Also see the Embedded Signing features page in the DocuSign Developer Center which shows exactly which params you need to set etc:

Resources