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.
Related
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.
When calling the YouTube API, we've started getting error responses with the following message:
{
"code" : 403,
"errors" : [ {
"domain" : "usageLimits",
"message" : "Project 418176253215 has been scheduled for deletion and cannot be used for API calls. Visit https://console.developers.google.com/iam-admin/projects?pendingDeletion=true to undelete the project.",
"reason" : "accessNotConfigured",
"extendedHelp" : "https://console.developers.google.com/iam-admin/projects?pendingDeletion=true"
} ],
"message" : "Project 418176253215 has been scheduled for deletion and cannot be used for API calls. Visit https://console.developers.google.com/iam-admin/projects?pendingDeletion=true to undelete the project."
}
However, I cannot use the link provided because I can't find what account was used to create the key for the API (I've inherited the code).
Is there a way to discover what account aligns with a YouTube API key?
There is no documentation in Youtube API which states how to do this because if you own the API key, logging in the Google Dev Console under the given project name should easily display all the API keys being used.
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.
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"
}
I'm using the titanium module inAppBilling 3.0.1 For Android subscriptions and the app is in alpha testing, but I'm not getting the parameter called "autoRenewing".
The response I'm getting
{ "orderId" : "",
"packageName" : "com.dumy.in",
"productId" : "subscribed',
"purchaseTime" : 2016-17-2,
"purchaseState" : 0,
"purchaseToken" : dhbvhjbGHGHvdjksdkjsnkjvdj38365358njkxjsfjfsfHJGHJ,
}
and the response i want :
{ "orderId" : "",
"packageName" : "com.dumy.in",
"productId" : "subscribed',
"purchaseTime" : 2016-17-2,
"purchaseState" : 0,
"purchaseToken" : dhbvhjbGHGHvdjksdkjsnkjvdj38365358njkxjsfjfsfHJGHJ,
"autoRenewing" : true,
}
You're probably using your Google account as tester - check it in Google Play dashboard.
Make sure on the device you are testing there is only one Google account which is not a tester (I created a new account). It works for me.
To test that this step is working try buying a consumable product you
should see a Google dialog with a message saying this is a test
purchase (or text similar). Once you delete the test account and log
in with new one it should work.