PayPal Payflow Pro Result 117: Failed merchant rule check - paypal

I am using PayPal's Payflow pro API on a test account and no matter what, it tells me the field is incorrect. I am using PHP. This is the string being sent to them:
curl https://pilot-payflowpro.paypal.com -s --insecure -d PARTNER=PayPal -d PWD=XXXXXX -d VENDOR=XXXXXXX -d USER=XXXXXXX -d TENDER=C -d ACCT=5555555555554444 -d TRXTYPE=C -d EXPDATE=1221 -d AMT=1.00
And the response says:
RESULT=117&PNREF=A91A0D948350&RESPMSG=Failed merchant rule check
I have pass all correct information.Can you please help me for this?
Any help would be appreciated.

[Edit: You need TRXTYPE=S for charging a "Sale" -- and not C for sending a "Credit" to the card]
In https://manager.paypal.com , under Service Settings, select Fraud Protection, Test Setup, and Edit Standard Filters.
Clear all the boxes in the left-most column. Then click Deploy.
Fraud protection settings and other account-level changes will propagate and take effect within one hour.
This is documented in step 9 and 10 here: https://developer.paypal.com/docs/payflow/test-hosted-pages/#set-up-paypal-manager , and on a Payflow test account applies to all test transactions (not just "Hosted Checkout Pages") by default.

Related

Basic authentication with GitHub API X-Rate-Limit

I'm practicing with GitHub API using curl.
I've authenticated my request about my own repos, and the GitHub guides suggest the x-rate-limit (cap on requests per hour) should go up to 5000.
This did indeed happen on first request.
I entered
curl -i -u Vanilla https://api.github.com/users/Vanilla
Then got prompt for password and entered my PAT.
Header info showed x-rate-limit of 5000.
Since then I exported my PAT to a variable and called
curl -i -u Vanilla:$var https://api.github.com/users/Vanilla
This returned x-rate-limit as 50.
Now, even if I use the previous format of just username and enter PAT when prompted, x-rate-limit still capped at 50.
I'm confused as to why.
Any help much appreciated.
Thanks

How to enable Suspended Billing When Creating a New Classic Virtual Server via ibmcloud CLI

Using the ibmcloud CLI, how do I specify Suspended billing?
I am trying to create two identical VM instances, the first via the GUI and the second via the ibmcloud CLI.
Classic Infrastructure.
CLI command:
ibmcloud sl vs create -H ibm -D example.com -c 1 -m 2048 -d dal13 -o UBUNTU_18_64 --disk 25 --san
When I compare the two instances in the GUI, they are identical except for hostname, IP addresses and Suspended billing. The are also identical when using the CLI command ibmcloud sl vs detail ID.
The problem I am trying to solve is: instances created with the CLI have Suspending billing as Unavailable. Instances created thru the GUI have Suspended billing as Enabled on Power Off.
This link is the documentation that I am using for creating an instance with the CLI. No mention of Suspended billing options.
I solved this problem, but I am very open to additional information. Please comment if you know the link to any documentation on this matter.
It appears that you must select a preconfigured virtual server instance type called "flavor" to enabled suspended billing. I could not find any clear documentation on this, but I saw this in API calls link.
I found this command which lists the flavors available:
ibmcloud sl vs options
This CLI command creates an instance with suspended billing enabled. Notice the use of the --flavor command line option:
ibmcloud sl vs create -H ibm2 -D example.com --flavor B1_1X2X25 -d dal13 -o UBUNTU_18_64 --san

running a rundeck job from a rest api

I would like to allow anyone to trigger a job I've created in Rundeck.
I can't understand from the API documentation how to do that.
Any one knows, and can give simple examples (my understanding of the subject is minimal to none)?
What I've found is of the sort:
POST /api/1/job/[ID]/run
In order to use the Rundeck API, you need to authenticate first.
Authentication can be done in two different ways:
Using a Token
Using a username and a password
Here is an example of running a Rundeck job using its API (Token based authentication)
curl -X POST http://rundeck_server:port/api/19/job/87bdc26ce-9893-49bd-ad7a-97f4c4a39196/run?authtoken=AVy8jZdcpTYOyPcOVbfcfOQmB6b92zRu --header "Content-Type:text/xml"
Explanation:
19: the API version or Rundeck installation version (19 matchs
Rundeck 2.8.2)
87bdc26ce-9893-49bd-ad7a-97f4c4a39196: Job UUID
run: Runs a job
PS: To obtain an API Token, you must first log in to the Rundeck GUI using a user account. Click on your username in the header of the page, and you will be shown your User Profile page. From this page you can manage your API Tokens.
To update the answer above, this is an example of running a job and feeding it arguments
You will need to replace hostname/API version/job UID/token
Also the current version can be used with JSON only
curl -X POST https://rundeck-hostname.com/api/41/job/7087d3b7-e454-4983-abd5-a211d21d6f27/run?authtoken=[redacted] -H "Accept: application/json" -H "Content-Type: application/json" -d '{
"options": {
"optionName":"optionValue",
}
}
'
And if you need additional arguments for running a job you can find the updated documentation at https://docs.rundeck.com/docs/api/rundeck-api.html#running-a-job

Paypal - RestAPI - Sandbox Webhook not occurring

Using my sandbox account with the RestAPI, I've created an invoice. My buyer account got the notification, I went to the link and paid it ok. There's notifications that I received payment. However, no WebHook notification.
I added all events to my WebHook. When using the WebHook simulator, I get the POST to my API just fine. It's hosted by a Redmond based cloud provider and is https.
Under the WebHook Events link in the Sandbox section, it's showing no entries.
Where else can I go to investigate this?
list all your registered webhooks use following with your actual access-token
curl -v -X GET https://api.sandbox.paypal.com/v1/notifications/webhooks \
-H 'Content-Type:application/json' \
-H 'Authorization: Bearer <Access-Token>'
in the response, you should be able to find out what exactly were in the system for your webhooks, if not, did you created the webhooks as document says?
curl -v POST https://api.sandbox.paypal.com/v1/notifications/webhooks \
-H 'Content-Type:application/json' \
-H 'Authorization: Bearer <Access-Token>' \
-d '{
"url": "https://www.yeowza.com/paypal_webhook",
"event_types": [
{
"name": "PAYMENT.AUTHORIZATION.CREATED"
},
{
"name": "PAYMENT.AUTHORIZATION.VOIDED"
}
]
}'
From what I see on the RestAPI documentation azlankasim is correct saying that only some fundings are supported.
On the bottom of the page it says that only PayPal authorizations are supported.
https://developer.paypal.com/docs/integration/direct/rest-webhooks-overview/
"Note: Only PayPal authorizations are currently supported. Direct credit card transactions are not yet supported. We are actively working on adding more event types."
Have you tried to test using PayPal payment, to check if this is the problem?
You may need to check what are the funding sources used to create the payment. Currently webhook only sends the notification if the customer pays with an echeck. So far there are no notifications sent if the payment is made with other funding sources. Also, you may need to check the events that you have chosen. Based on this documentation , only authorizations are currently supported.

Is it possible to share Facebook Test users between test apps?

We have seperate URLs for our webapp on local development and on build servers (acceptance test environment) This means that we have to setup 2 seperate Test Apps for Local and Acceptance Test.
When creating test users it seems they can only be created to be valid on only 1 test app... and I have not been able to find a way to share test users between test apps. Not being able to do this makes automated acceptanse testing a pain... as we have to have seperate testdata for Local testing and acceptance testing.
Would love to hear any suggestions on how to solve this easily?
Simple example with curl (its not possible to do it from the Dashboard)
Copy
curl -i -X GET \
"https://graph.facebook.com/v2.9/SOURCE_APP_ID/accounts/test-users?access_token=SOURCE_APP_ACCESS_TOKEN"
Paste
curl -i -X POST \
-d "uid=TEST_USER_ID" \
-d "owner_access_token=SOURCE_APP_ACCESS_TOKEN" \
-d "access_token=TARGET_APP_ACCESS_TOKEN" \
"https://graph.facebook.com/v2.9/TARGET_APP_ID/accounts/test-users"
Afaik you can only create test users for one App, but you can also create them with the API as it is explained in the Facebook docs: https://developers.facebook.com/docs/apps/test-users
Direct link to example code: https://developers.facebook.com/docs/graph-api/reference/v2.2/app/accounts/test-users
Create a test user and then use the API to connect the user to the second app.