Authorize.net Accept Hosted Redirect Methods webhook response have responseCode 0 - authorize.net

We are using Accept Hosted Redirect Methods for our payment.
Some transaction's webhook callback have responseCode 0.
But these transactions are listed as approved in ANET account.
In our webhook code , we are processing only the responses with responseCode 1.
But when we take the transaction details using the ANET PHP SDK(Method GetTransactionDetails ) , it returns response code as 1.
Can any one help us to identify why the responseCode parameter have value 0.
Response received via hook callback
{
"notificationId": "************",
"eventType": "net.authorize.payment.authcapture.created",
"eventDate": "2021-04-14T21:52:39.1188391Z",
"webhookId": "********************",
"payload": {
"responseCode": 0,
"authAmount": 115.00,
"merchantReferenceId": "******************",
"invoiceNumber": "**********",
"entityName": "transaction",
"id": "************"
}
}

During the day "2021-04-14T21:52:39.1188391Z" there is some update happens from the ANET Side. As per the feedback from the ANET Support team they are worked on the WEBHOOK section exactly on the same day

Related

Getting unexpected '#' error under postman Test tab

I am a learner in postman and do not have much experience in programming/scripting.
Here the issue.
Used POST api request - For getting the access token;
Used POST api request - To create an account;
Used POST api request - To cancel an account with CancellationReason
Need to crosscheck the cancellation details (some fields like cancellationReason) in web application.
In order to avoid manually check, i have used GET request api like below
by passing all the mapped fields (as per web application) in the GET request end url
(i.e. by sending the details in fetch_xml query parameter in the end url) in order to get those required fields returned.
Now i got a successful response with status code.
After that i want to compare the fetched values (from the response body) ... VS.... to the data i passed while cancelling the account (i.e. in POST api request - To cancel the account) and make sure both are same.
After that under Test tab - I have updated query like below, however it throwing an Unexpected '#' error (as the below query contains '#' in middle of the field name)
tests["Verify the CancellationReason matches"] = pm.expect(data._usr_cancellationReason_value#OData.Community.Display.V1.FormattedValue).to.eql("CancellationReason");
Can someone please help me to understand whether i should remove this #symbol or should replace with something else ?
Here is the response body:
{
"#odata.context": "https://hfrdcompanies.integrationdev01.crm3.cs.com/api/data/v9.1/$metadata#hfrd_workorders(_usr_cancellationchannel_value,usr_CancellationChannel,_usr_workorderreason_value,usr_WorkOrderReason,hfrd_workorderid,usr_cancellationuser,_usr_cancellationsource_value,usr_CancellationSource,hfrd_name,usr_CancellationChannel(),usr_AccountReason(),usr_CancellationSource())",
"value": [
{
"#odata.etag": "W/\"2345234523\"",
"_usr_cancellationchannel_value#OData.Community.Display.V1.FormattedValue": "Mobile App",
"_usr_cancellationchannel_value": "acefsdflin89-f9jf07-e969f1-a245nk11-00jnfnafn9799fc2a",
"_usr_Accountreason_value#OData.Community.Display.V1.FormattedValue": "Customer Inactive",
"_usr_Accountreason_value": "bde1234522-d45662-e2711-a84561-0007354a2d5c2a",
"hfrd_Accountid": "89025sf3-c668f-e7811-a4331-00asdhh3ab9bd1c",
"usr_cancellationuser": "Testuser08 ABC",
"_usr_cancellationsource_value#OData.Community.Display.V1.FormattedValue": "MOBILE",
"_usr_cancellationsource_value": "6c23asdf-c562-e411-a841-00asdfa",
"hfrd_name": "FP-WK-1000000642"
}
]
}
I want to validate the bold row

GMB MyBusiness API - How to set up real-time PubSub notifications?

I am working on integrating GMB into some of our internal apps, and would like to set up to receive real-time notifications for reviews and questions.
I have created a topic, and a subscription with a valid URL.
The next step is to tell GMB to send the notifications to the topic, and I believe the endpoint is the one below. However, it is very vague about the parameters it wants.
This is the documentation
https://developers.google.com/my-business/reference/rest/v4/accounts/updateNotifications
It wants a "Notification Settings Resource Name" in the URL, but it's not explained anywhere what that actually is. I have tried every possible value, but always get a 404 error response with the message "Requested entity was not found."
Has anyone successfully set this up? What values does the "getNotifications" endpoint want, and where in the various dashboards can this be found or created?
Any help is much appreciated!
As mentioned in the comments, you need to send the accountId as part of the URL.
To find this, you will first need to send a GET request to
https://mybusiness.googleapis.com/v4/accounts
This will return something along the following lines:
{
"accounts": [
{
"name": "accounts/102647145453118950380",
"accountName": "Tom Spencer",
"type": "PERSONAL",
"state": {
"status": "UNVERIFIED",
"vettedStatus": "NOT_VETTED"
},
"profilePhotoUrl": "//lh3.googleusercontent.com/a-/AOh14GgPkuJj03DeCa1isBAJALY4eOl09WGYVFrM4mG5=s132"
},
]
}
You can see here that accounts/102647145453118950380 is returned in the name field. Take this field, and construct the following URL:
https://mybusiness.googleapis.com/v4/accounts/102647145453118950380/notifications
Send a PUT request to this URL, with a request body resembling the following:
{
"topicName": "projects/{projectId}/topics/{topicId}",
"notificationTypes": [
"NEW_REVIEW",
"UPDATED_REVIEW"
]
}
Assuming you have pub/sub setup as per the documentation, this should send a message to your topic/subscribers whenever a new review is created or a review is updated.

Slack returns error on setting event subscription URL with Amazon Lex

I created a bot in AWS Lex and I am trying to integrate it with Slack. I created a Slack app and followed the documentation as mentioned in-
https://docs.aws.amazon.com/lex/latest/dg/slack-bot-association.html
However, while trying to integrate with the Lex Postback URL I get an error saying
Your URL didn't respond with the value of the challenge parameter.
Our Request:
POST
"body": {
"type": "url_verification",
"token": "VbODUleNdk2hieCvDwlScrQF",
"challenge": "HRUXnK6YYLpx5U1s9AiADZgA0BAhWuTzfjAAzLEJIw1zz4GfuMAb"
}
Your Response:
"code": 200
"error": "challenge_failed"
"body": {
}
Per my knowledge, Lex by default should provide the response. Am I doing something wrong here? Any leads will help.
Thanks in advance.
I encountered this this morning and I thought I'd add my own experience. Slack appears to be pushing a 'Verification Token' as a replacement for the 'Signing Key', and claims they're interchangeable but that the token is more secure. I wasn't able to get the challenge response when using the token, but it worked fine when using the key.
Came across the same issue. The POST request that Slack was sending my endpoint was not what my function was designed for. I followed the tutorial at https://api.slack.com/tutorials/events-api-using-aws-lambda and had to add a line:
exports.handler = (data, context, callback) => {
data = JSON.parse(data.body); // added this line
switch (data.type) {
case "url_verification": verify(data, callback); break;
case "event_callback": process(data.event, callback); break;
default: callback(null);
}
};

Receipt_id is null in Paypal response, How can I get it?

I have integrated Paypal with my rails application by activemerchant gem, As of now I'm getting token and payer_id, but I need receipt_id which is null in response.
I have followed steps given in this link.
Response of Paypal is given below
"timestamp"=>"2016-04-12T19:23:46Z", "ack"=>"Success",
"correlation_id"=>"000a000f000r", "version"=>"124", "build"=>"000000",
"token"=>"AB-000000000000000", "transaction_id"=>"kjKJKHkj09809FED2",
"parent_transaction_id"=>NULL, "receipt_id"=>NULL,
"transaction_type"=>"express-checkout", "payment_type"=>"instant",
"payment_date"=>"2016-04-12T19:23:46Z", "gross_amount"=>"160.00",
"gross_amount_currency_id"=>"USD", "fee_amount"=>"6.54",
"fee_amount_currency_id"=>"USD", "tax_amount"=>"0.00",
"tax_amount_currency_id"=>"USD", "exchange_rate"=>NULL,
"payment_status"=>"Completed", "pending_reason"=>"none",
"reason_code"=>"none", "protection_eligibility"=>"Eligible",
"protection_eligibility_type"=>"ItemNotReceivedEligible,UnauthorizedPaymentEligible",
"secure_merchant_account_id"=>"JHBJKJKJBKJBKJH",
"success_page_redirect_requested"=>"false",
"coupled_payment_info"=>NULL, "Token"=>"AB-000000000000000",
"PaymentInfo"=>"{"TransactionID"=>"kjKJKHkj09809FED2",
"ParentTransactionID"=>nil, "ReceiptID"=>nil,
"TransactionType"=>"express-checkout", "PaymentType"=>"instant",
"PaymentDate"=>"2016-04-12T19:23:46Z", "GrossAmount"=>"160.00",
"FeeAmount"=>"6.54", "TaxAmount"=>"0.00", "ExchangeRate"=>nil,
"PaymentStatus"=>"Completed", "PendingReason"=>"none",
"ReasonCode"=>"none", "ProtectionEligibility"=>"Eligible",
"ProtectionEligibilityType"=>"ItemNotReceivedEligible,UnauthorizedPaymentEligible",
"SellerDetails"=>{"SecureMerchantAccountID"=>"JHBJKJKJBKJBKJH"}}",
"SuccessPageRedirectRequested"=>"false", "CoupledPaymentInfo"=>NULL
Is there any configuration in Paypal account to get receipt_id, or any request parameter I have to add/change?
Please suggest.
Thanks in advance.
I have discussed this with paypal developer support and it seems like the transaction sale ID is the appropriate ID to record and return to the user, it is also what gets recorded in the paypal account for a credit card transaction so if a user had a support question, it is the easiest number to give to accounts to look up the transaction details.
I am not 100% sure about how to access what is called the receipt_id, but I don't think it is intended to be populated in the response to the payment endpoint. If you are to get a receipt_id at all, it will likely come from hitting the endpoint GET /v1/payments/sale/<Transaction-Id>
As per the api, receipt_id is defined as
Receipt id is 16 digit number payment identification number returned for guest users to identify the payment.
I think "guest users" may have a specific meaning that is not relevant to just any transaction but I'm not positive on this.
I would recommend playing around with this endpoint after you get the transaction ID from the payments endpoint. The id located in the json returned from the payments endpoint at payment.transactions[0].related_resources[0].sale.id seemed to be the appropriate ID to record for a simple credit card transaction where I wanted to return a reference number to the client and to store for looking up the transaction at a later date.
I also was able to use that ID to interrogate the sale endpoint mentioned above for more information, but I never was able to get receipt_id to populate for a sandbox operation.
Hope this helps, I find some of the documentation to be lacking for the REST api.
"transactions": [
{
"amount": {
"total": "7.47",
"currency": "USD",
"details": {
"tax": "0.03",
"shipping": "0.03"
}
},
"description": "This is the payment transaction description.",
"related_resources": [
{
"sale": {
"id": "4RR959492F879224U",
"create_time": "2013-01-31T04:12:02Z",
"update_time": "2013-01-31T04:12:04Z",

couldn't receive google glass notification after subscription?

I have created a timeline card with menu item and subscribed the same.When i try it(clicked the menu item) from mirror api playground ,it shows notification send but my service couldn't receive any notification.Its not showing any sign of hitting my service log also.
Below is my subscription json.
{
"kind": "mirror#subscription",
"id": "timeline",
"updated": "2013-12-19T06:27:20.269Z",
"collection": "timeline",
"operation": [
"UPDATE"
],
"callbackUrl": "https://mirrornotifications.appspot.com/forward?url=http://192.xxx.xx.xxx:8080/GlassService/google/service/get_balance",
"verifyToken": "example_user",
"userToken": "email"
}
instead of ip address in the callback url i tried with localhost also.i got same result.
Please help me with this.
Thanks in advance.
Google subscription does not support local url or proxy. You have to submit public url with SSL support for callback Like "https://www.yourdomain.com/yourmethod".
Another way is, you can use "Introspected tunnels to localhost". then your local url become public and you will get notification after subscription.