What are the common practices of checking paytm transaction result? - paytm

As Paytm does not provide server side notification, what if user closed the app after payment before redirecting to the callback url, or simply failed to redirect due to network error etc.? How do we know if user has paid or not?

As per PayTM documentation.
"As per secure practices, before marking transaction as success in system on receiving success response from Paytm, merchant should re-verify transaction status and amount of order by calling Paytm status query API from their back-end server."
You should use below api (Staging)
https://pguat.paytm.com/oltp/HANDLER_INTERNAL/getTxnStatus
with below parameters
https://pguat.paytm.com/oltp/HANDLER_INTERNAL/getTxnStatus?JsonData=
{
"MID":"MID",
"ORDERID":"ORDERID",
"CHECKSUMHASH":"CHECKSUMHASH"
}
This will give you response in json where you can find STATUS and check if your transaction was successful or not. and you can refund any payment made by user in case of failure transaction.
{
"TXNID" : "414709",
"BANKTXNID" : "",
"ORDERID" : "ORDER48886809916",
"TXNAMOUNT" : "1.00",
"STATUS" : "OPEN",
"TXNTYPE" : "SALE",
"GATEWAYNAME" : "",
"RESPCODE" : "",
"RESPMSG" : "",
"BANKNAME" : "",
"MID" : "klbGlV59135347348753",
"PAYMENTMODE" : "CC",
"REFUNDAMT" : "0.00",
"TXNDATE" : "2015-11-02 11:40:46.0"
}

Related

Google Business Profile Performance API PERMISSION_DENIED

I'm currently working on migrating from the Google My business V4.9 to the Business Profile Performance API .
For number of credentials the changes are working as expected but for others, there is a problem with making the request as I'm getting this error.
GET https://businessprofileperformance.googleapis.com/v1/locations/****:getDailyMetricsTimeSeries?dailyMetric=CALL_CLICKS&dailyRange.endDate.day=8&dailyRange.endDate.month=1&dailyRange.endDate.year=2023&dailyRange.startDate.day=31&dailyRange.startDate.month=12&dailyRange.startDate.year=2022
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "The caller does not have permission",
"reason" : "forbidden"
} ],
"message" : "The caller does not have permission",
"status" : "PERMISSION_DENIED"
}
Worth to mention that for the same credentials and scope everything is working with the older endpoints.
I'm currently using https://www.googleapis.com/auth/plus.business.manage, can this be the problem as it has been deprecated(But you can still use it) and now there is https://www.googleapis.com/auth/business.manage instead?
UPDATE
It seems that before it simply returned an empty list of reports for this location, and now it's throwing an exception.

Datorama & DV360 Data Stream

I am getting an error when trying to connect my DV360 account to Datorama Stream. I know for sure my credentials arent the problem because I am granted acces when using Google Analytics or Adwords with the same account but specifically with DV360 I get this:
Provider's Internal Error
403 Forbidden GET https://displayvideo.googleapis.com/v1/advertisers?pageSize=100&partnerId=4611731
{ "code" : 403, "errors" :
[ { "domain" : "global",
"message" : "No permission for attempted operation on PARTNER with ID \"4611731\".",
"reason" : "forbidden" } ],
"message" : "No permission for attempted operation on PARTNER with ID \"4611731\".", "status" : "PERMISSION_DENIED" }
Does anyone know what the problem might be? would it be something on the web app side?
Cheers,

Payment via Braintree PayPal always fails iOS

I have opened a ticket about this on Braintree iOS's GITHub. Just hoping to get some help fast. Here goes the issue:
As the title says, my payment (in iOS) always fails. While apparently, the payment in my colleague's work (Android) succeeds.
I followed thoroughly the sample codes and guidelines from here: https://developers.braintreepayments.com/guides/paypal/client-side/ios/v4
In iOS, after all the process (Client Token from our Server --> BT SDK --> PayPal browser --> App --> send nonce to our server), the error I get from our server is always:
PayPal pending payments are not supported.
My backend guy does not know the reason behind this too, he only showed and gave me this log:
{
"errors": {},
"params": {
"transaction": {
"type": "sale",
"amount": "1",
"merchantAccountId": "USD",
"paymentMethodNonce": "80823f63-5ea9-0b8b-67da-0710bd7d9ff1",
"orderId": "333",
"descriptor": {
"name": "company name*myurl.com"
},
"options": {
"submitForSettlement": "true",
"paypal": {
"customField": "custom",
"description": "description"
}
}
}
},
"message": "Unknown or expired payment_method_nonce.",
"creditCardVerification": null,
"transaction": null,
"subscription": null,
"merchantAccount": null,
"verification": null
}
And here's what I do in setting up my SDK:
private func processPayPalClientToken(_ clientToken: String) {
SVProgressHUD.show(withStatus: "Please wait...")
self.braintreeClient = BTAPIClient(authorization: clientToken)
let payPalDriver = BTPayPalDriver(apiClient: self.braintreeClient)
payPalDriver.viewControllerPresentingDelegate = self
payPalDriver.appSwitchDelegate = self
let request = BTPayPalRequest(amount: self.bookingViewModel.getTotalAmount())
payPalDriver.requestOneTimePayment(request) { (nonce, error) in
SVProgressHUD.dismiss(completion: {
if let error = error {
self.showAlert(title: "title...", message: "Error: \(error.localizedDescription).", okayButtonTitle: "OK") { _ in }
return
}
guard let nonce = nonce else { return }
self.processNonceToServer(nonce)
})
}
}
So... any idea what's the reason behind this? Thanks!
EDIT: Additional info that I found a while ago. The SFSafari browser dismisses itself too soon that's why the nonce I get is always invalid. Why is that?
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact
support.
Based on the payment method nonce that you posted in your question, I was able to take a look into our server-side logs to see what the issue is.
Without giving away any specific API Credentials, it appears as if the server responsible for generating a client token in your setup is passing a different Sandbox merchant ID than the server responsible for creating the transaction with that payment method nonce, which is leading to an error.
Your server is responsible for generating a client token, which contains the authorization and configuration details that your client needs to initialize the client SDK. When a payment method nonce is created, it is tied to the merchant ID that is specified in the client token authorization. The merchant ID passed during the Transaction Sale call or other API Calls must match the merchant ID that is tied to that specific payment method nonce, so you will need to fix this discrepancy in your backend code.
For the benefits of the others who are experiencing the same issue, check out my closed ticket I filed on Braintree's Github (link above or this: https://github.com/braintree/braintree_ios/issues/405)
Here's my colleague and I have discovered:
We can pay successfully using this CREDIT UNION payment method.
BUT we can't pay using PAYPAL BALANCE.
The errors like below happens in PayPal Balance option.
PayPal pending payments are not supported
So the answer in this issue would be: make sure that everything in your client is working and you're using correct and same accounts for the clientToken and the PayPal account you're using to pay.

google safebrowsing api response : Deadline expired before operation could complete

I'm using the google safebrowsing api for getting fullhashes for the prefixes of hashes of url present in threat lists. When i'm using 5 threads to do the job, the job completes but the latency is high, so i tried increasing the threads to 7 and more but i'm getting the following error on doing that:
com.google.api.client.googleapis.json.GoogleJsonResponseException: 504 Gateway Time-out
{
"code" : 504,
"errors" : [ {
"domain" : "global",
"message" : "Deadline expired before operation could complete.",
"reason" : "backendError"
} ],
"message" : "Deadline expired before operation could complete.",
"status" : "DEADLINE_EXCEEDED"
}
But, I'm sure that my daily quota has not exceeded.
By looking at the console, i can see that the number of requests per second is not more than the default quota (3000 req/100sec).
What other reason can be there for the above error ?

PayPal iOS SDK authorization payment

I want to do authorization payments with the PayPal iOS SDK, but it seems like PayPal is ignoring the intent i'am providing.
I'am setting the intent to authorize
[payment setIntent:PayPalPaymentIntentAuthorize];
but the object always return a sale payment.
Confirmation: {
"client" : {
"environment" : "mock",
"product_name" : "PayPal iOS SDK",
"paypal_sdk_version" : "2.1.0",
"platform" : "iOS"
},
"response_type" : "payment",
"response" : {
"id" : "PAY-6RV70583SB702805EKEYSZ6Y",
"state" : "approved",
"create_time" : "2014-07-01T17:11:11Z",
"intent" : "sale"
}
}
Any way to fix this?
Dave from PayPal here.
When you are running in the "Mock" environment, you will always get back the same response, regardless of the details of your requested payment.
If you set your environment to "Sandbox" you should get back a response that correctly reflects your payment request.

Resources