Paypal SDK sandbox mode return status "Created" - android

I have integrated Paypal in my android app, user can pay by either Paypal or card.
Card Payment is working correctly but when paying through Paypal returns status "created" instead of "approved".
Below is response from Paypal -
{
"client": {
"environment": "sandbox",
"paypal_sdk_version": "x.xx.x",
"platform": "Android",
"product_name": "PayPal-Android-SDK"
},
"response": {
"create_time": "2016-05-23T10:51:47Z",
"id": "PAY-XXXXXXXXXXXXXXXXXXXXXXXX",
"intent": "sale",
"state": "created"
},
"response_type": "payment"
}
Why it is not returning status to approved.
What is wrong in my code.
TIA

For Sandbox environment, You need to use a credit card that is registered under the sandbox personal account. Check the "Profile" of the PayPal sandbox personal account and go to the "Funding" tab for the test credit card. This will give you a "approved" result instead of "created".

The problem is you are created the Merchant account as Business account in your sandbox, but we need to create Business-Pro account in sandbox.
I got solved the issue by created like that.

Related

Android Management API : Change GCP project and Pub/Sub for devices notifications?

I have a question about the Google "Android Management API".
https://developers.google.com/android/management/reference/rest/v1/enterprises
What we have today :
We have one enterprise per environment (preprod, prod) to manage our devices.
PREPROD : LC02htlxxx
PROD : LC00izayyy
With these enterprises, we can perform these actions :
enroll a device ;
send policies to the enrolled devices ;
send commands (reboot kiosks for example)
Each enterprise is linked to a GCP project and a pub/sub topic.
With this pub/sub topic, we can receive the enrollments and report events.
When I perform a GET https://androidmanagement.googleapis.com/v1/enterprises/LC02htlxxx
The result is :
{
"name": "enterprises/LC02htlxxx",
"enabledNotificationTypes": [
"ENROLLMENT",
"STATUS_REPORT",
"COMMAND"
],
"pubsubTopic": "projects/mobile-retail-xxxx/topics/admin-android-test",
"contactInfo": {
"dataProtectionOfficerName": "",
"dataProtectionOfficerEmail": "",
"dataProtectionOfficerPhone": "",
"euRepresentativeName": "",
"euRepresentativeEmail": "",
"euRepresentativePhone": ""
}
}
What we want to do :
We would like to change both the GCP project and the pub/sub topic used to receive the notifications for the enterprise.
Indeed, we are currently switching of GCP project for technical migration matter.
So we would like
enterprise enterprises/LC02htlxxx with projects/mobile-retail-xxxx/topics/admin-android-test
to become
enterprise enterprises/LC02htlxxx with projects/kdm-mdm-staging-yyyy/topics/admin-android-test
What we tried to do :
We tried to perform a PATCH https://androidmanagement.googleapis.com/v1/enterprises/LC02htlxxx
with this body :
{
"name": "enterprises/LC02htlxxx",
"enabledNotificationTypes": [
"ENROLLMENT",
"STATUS_REPORT",
"COMMAND"
],
"pubsubTopic": "projects/kdm-mdm-staging-yyyy/topics/admin-android-test",
"contactInfo": {
"dataProtectionOfficerName": "",
"dataProtectionOfficerEmail": "",
"dataProtectionOfficerPhone": "",
"euRepresentativeName": "",
"euRepresentativeEmail": "",
"euRepresentativePhone": ""
}
}
And the answer is :
{
"error": {
"code": 400,
"message": "Invalid pub/sub topic projects/kdm-mdm-staging-yyyy/topics/admin-android-test. Choose a topic from the mobile-retail-xxxx Google Cloud Platform project.",
"status": "INVALID_ARGUMENT"
}
}
Finally, our questions :
Is it possible to change the GCP PROJECT for an Enterprise ?
(it looks like the enterprise is linked to only a GCP project on its creation (???) I cannot change it)
If it is possible, how can we do it ? We tried without any success with the given APIs :
https://developers.google.com/android/management/reference/rest/v1/enterprises
If it is not possible, how can I transfer all our enrollments to a new enterprise without any user action ?
(if we cannot change the GCP project of our enterprise, we will have to transfer all the enrollments and all applications links on out playstore)

EMM managed configuration key values for Boxer email app

I am working on setting up email apps for my enterprise in the EMM work profile created through Android management API. I was able to setup the Gmail app using the managed config details in https://support.google.com/work/android/answer/7065453?hl=en.
But I am not able to find such documentations for the Boxer mail or the Outlook app. The gmail app and calendar has been unreliable with some sync issues, so would appreciate some guidance in Boxer mail or Outlook setup through managed configurations.
Not all applications support or document managed configuration. It’s up to the app developer to implement and document it.
You can try checking the managed configuration schema for an app using the enterprise.application.get method. It returns a json with the managed properties that the app supports..
For example:
"managedProperties": [
{
"key": "com.microsoft.outlook.EmailProfile.EmailAddress",
"type": "STRING",
"title": "email address"
},
{
"key": "com.microsoft.outlook.EmailProfile.EmailAccountName",
"type": "STRING",
"title": "description for account"
},
{
"key": "com.microsoft.outlook.EmailProfile.ServerHostName",
"type": "STRING",
"title": "exchange server url"
}]
Additionally, upon checking the Boxer Mail (com.boxer.email), it doesn’t seem to support any managed configuration.

credit card payment with paypal sandbox returns response as "state": "created"?

I have integrated Paypal in my android application, user can pay by credit card or paypal account.While doing paypal account payment working fine, am getting response as "status" : "approved" then merchant account credited successfully..
while doing Card Payment, am getting response as "status": "created" instead of "approved". and merchant account not credit the specified amount?
Environment : sandbox.
Response while doing the card payment:
"response": {
"state": "created",
"id": "PAY-92898807R9269472DK6NSSTA",
"create_time": "2016-07-29T10:00:44Z",
"intent": "sale"
},
"client": {
"platform": "Android",
"paypal_sdk_version": "2.14.4",
"product_name": "PayPal-Android-SDK",
"environment": "sandbox"
},
"response_type": "payment"
}
Is there any mistake in this code?
Finally i got the "state": "approved" and merchant account credit with specified amount in sandbox environment for credit card payment. The problem is I created the Business account in my sandbox, but we need to create Business-Pro account in sandbox..

Customer login api using Clover SDK

I have create account in clover and using that account i have found the merchantId and created api token for that using these i have created the customer for that merchant.
I have created the customer in clover and using merchantId and API token.Now i want to login with that created customer but i could not find the api for login in clover.can anyone tell me whether the api available for login with customer in clover?
I have referred this link list of clover apis https://www.clover.com/api_docs#!/customers
I created the customer using this api https://www.clover.com/api_docs#!/customers/CreateCustomer
Api url for create customer : https://api.clover.com/v3/merchants/024SK6Q06NKP0/customers
request parameter :
{
"firstName": "Test",
"lastName": "test Last Name",
"phoneNumber": "2135124541",
"emailAddress": "test#gmail.com",
"zip": "123123",
"country": "In",
"city": "Pune",
"address1": "Vimannagar",
"state": "Maharashtra"
}
It would be great if anyone have idea about this.Thanks in advance.

Amazon Fire (TV) In-app Purchase: Subscription

I am currently working on a test app for Amazon's In-App Purchasing SDK for Android. Specifically, I am working on Fire TV, but the problems also seems to appear on a Fire Tablet.
I created a (currently unpublished) App on my Developer account and added a subscription with both an annual and a monthly option.
Here is the exported JSON:
{
"inapppurchasingtestabo.monthly": {
"price": 1.07,
"subscriptionParent": "inapppurchasingtestabo",
"smallIconUrl": "http://",
"title": "Subscription",
"itemType": "SUBSCRIPTION",
"description": "This is the subscription!",
"languageTitleMap": {
"DE": "Abo",
"US": "Subscription"
},
"languageDescriptionMap": {
"DE": "Das ist das Abo!",
"US": "This is the subscription!"
},
"currencyPriceMap": {
"US": 0.0
}
},
"inapppurchasingtestabo.annually": {
"price": 10.72,
"subscriptionParent": "inapppurchasingtestabo",
"smallIconUrl": "http://",
"title": "Subscription",
"itemType": "SUBSCRIPTION",
"description": "This is the subscription!",
"languageTitleMap": {
"DE": "Abo",
"US": "Subscription"
},
"languageDescriptionMap": {
"DE": "Das ist das Abo!",
"US": "This is the subscription!"
},
"currencyPriceMap": {
"US": 0.0
}
}
}
I installed the Amazon App Tester App on the device and copied the JSON to /mnt/sdcard/amazon.sdktester.json.
While everything seems to work in principle - from the app I can see the subscription along with the available prices, the descriptions, etc. and I can also make a purchase which then shows up in the App Tester App - I see no indication as to which price is for which subscription period.
Compare the following screenshots:
Can you tell which price is for the monthly and which is for the annual subscription? (Also, keep in mind, that for all the user knows, they could be bi-weekly and semi-annual, too).
So my question is: What am I doing wrong and how do I get the purchase dialog to display the period along with the price?
Amazon app tester has not been updated with the new offerings they have developed in the in app purchases. I would advice to conduct a beta test to ensure that app works. App tester is a mock app that pretends to fulfill purchases. Beta test (Live app test) would test your app against the actual amazon services that executes in app purchases in real world (production for published app).
This is likely a bug or limitation with the Amazon App Tester app. From my experience, it does not fully replicate the production environment. It's useful for testing the basic workflow locally.
I would recommend you to use Live App Testing which allows you to test in the production environment.

Categories

Resources