We currently need to set the status of orders to CANCEL in ExactOnline through the API when they are cancelled in our shop.
I got through the ExactOnline API documentation and in the PUT request of salesOrders, I did not find any Status field that I can update but this field exists when this is a GET request. https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=SalesOrderSalesOrders
My PUT request would have this body as status 45 = Cancelled.
{
"Status": 45
}
Which currently returns "204 No Content" (which is normal) BUT the status is not updated.
What would be the workaround then?
Thanks.
Have you tried using the PHP API client? https://github.com/picqer/exact-php-client if your API request is malformed, this might be an easier way to do it.
After some inquiry and discussions with ExactOnline team, updating the status of sales related things through API is not feasible.
Related
How Can I get the transaction history via Payone server API "'https://api.pay1.de/post-gateway"
Is there any request command to achieve that ?
I've checked their API docs but couldn't find any request to get the transactions log.
I work for PAYONE. Unfortunately, there is currently no possibility to request the transaction history. If you have any further questions, don't hesitate to ask.
I need to use PHP to count the number of active subscriptions in my PayPal account (people subscribed to my service, not the counts of services I'm subscribed to).
Does anyone know how to do this or can point me in the right direction?
I can't find any documentation that allows you to see a list of your active subscriptions via the API, but I'm assuming that PayPal has this option and I'm just missing it...
This option cannot be found because it's apparently not available:
https://github.com/paypal/PayPal-REST-API-issues/issues/5
Apparently you cannot get a list of subscriptions regardless the status for the time being, as you can see here https://developer.paypal.com/docs/api/subscriptions/v1/#subscriptions there is no such feature available so let's hope Paypal adds it in the future.
However if you are storing the subscription ids in a database then you can loop them and foreach subscription id you can get the details of the subscription https://developer.paypal.com/docs/api/subscriptions/v1/#subscriptions_get and check its status and finally display only the ones with an active status.
https://www.paypal.com/billing/api/orchestrator/subscriptions?data=%7B%22total_required%22%3Atrue%2C%22sort_order%22%3A%22desc%22%2C%22page_size%22%3A%2220%22%2C%22page%22%3A%221%22%2C%22plan_ids%22%3A%22P-123456789ABCDE%22%2C%22statuses%22%3A%22ACTIVE%22%2C%22tab%22%3A%22all%22%7D
Just pass a query string like:
{"plan_ids":"P-123456789ABCDE","statuses":"ACTIVE"}
You can GET this, and specify a page size. It seems the max is 20, but you can change the page number too.
Change the plan_ids parameter that I have as "P-123456789ABCDE" to your plan ID and you'll get a JSON response. I'm sure this isn't advertised, but I found it digging through the PayPal site.
There doesn't appear to be a direct way to list all of your subscriptions, but you can use the Transaction Search API to retrieve a list of your transactions (one month at a time, max 500 results per page) and grab the paypal_reference_id of each transaction object, which will be a valid subscription ID if the paypal_reference_id_type is "SUB".
Here's an example of the GET URL, which requires an Oauth token:
https://api-m.sandbox.paypal.com/v1/reporting/transactions?start_date=2022-07-01T00:00:00-0700&end_date=2022-07-31T23:59:59-0700&fields=all&page_size=500&page=1
Here's a simplified example of the response data:
{
"transaction_details":
[
"transaction_info":
{
"paypal_reference_id": "I-ABCDEFGHIJKL",
"paypal_reference_id_type": "SUB",
}
]
}
Once you've retrieved all of your subscription IDs, you can use the Subscriptions API to retrieve their details (such as its status) via an authenticated GET request:
https://api-m.sandbox.paypal.com/v1/billing/subscriptions/I-ABCDEFGHIJKL
Here's a simplified example of the response data:
{
"status": "ACTIVE",
}
I would like to figure out if I can use webhooks with Magento and AfterShip to update the order status to "Delivered" (new order status to be created) after the package has been marked as delivered from the tracking information.
Aftership has a webhook system they use and Magento seems to be open to integration but I don't know anything on this subject.
I would like to do something like this:
1) Order is marked as "shipped" (default 'complete' status with new label) after order has left our facility
2) AfterShip tracks package and sends emails along the way
3) AfterShip sends email about delivery of package & sends "webhook order status update" to matched Order ID
4) Order Status in Magento is changed/put at "Delivered"
Thanks again to anyone who can offer information or help!
When you input the tracking number in magneto, aftership will get the tracking number from your system every 3 hrs.
This setting and message content is set in AfterShip.com after login.
You need to code a webhook script at your server side, say, using PHP.
When the package is "Delivered", aftership will fire the webhook and post the tracking info to your webhook endpoint. Your webhook script should receive the tracking update (with the order ID).
By using 3, your webhook know which ORDER ID need to be changed to "Delivered"
I hope this is what you want to know.
Is there any function in Authorize.Net that does the same of the IPN function on Paypal? I've read a lot about Silent Post but I have some of questions.
If I have at the moment of paying a Pending status, and after few days Authorize changes it to denied, Is Silent Post going to notify me this status change?
Does it work for DPM payment method?
Is there any php example code?
I need it very much because I'm doing a project that recharges devices like mobile phones, but in case to have a pending status I have to do this recharge, and if this status is later finally rejected I have to revert this changes, so I need in each moment to know the transaction status changes in Authorize.Net.
Silent Post is essentially Authorize.Net's version of IPN so it is what you're looking for.
If I have at the moment of paying a Pending status, and after few days Authorize changes it to denied?, is Silent Post going to notify me this status change?
No. Fortunately this rarely ever happens.
Does it work for DPM payment method?
Yes. It works for all payments regardless of method (DPM< AIM, etc) and status (approved, declined).
Is there any php example code?
Handling Authorize.Net Silent Post with PHP (I am the author of this article)
I am using the Google Checkout API to code a simple store. I have gotten as far as letting the user select items, edit the cart, and checkout/pay with Google Checkout. The notification API (with XML) is being used to read notifications sent by Google after receiving orders. How can I connect the order notifications with the orders information in my SQL database? Can I send an "order ID" or something like that to Google with the initial order? I have coded that portion (ordering) with the HTML API.
Thanks in advance!
When an order is placed, a notification is made giving you a serial number for the order. You need to store this serial number in your database against whatever internal order number you have, so that you can use the serial number to refer to the order with Google Checkout via the Notification API.
No. Notification and Polling are two separate concepts.
Notification is when Google Checkout sends you info as it occurs, and Polling is when you send a request for sale details at some time in the future.
Documentation for Polling is lacking on-line. That is why you - and I - have not found the answer.
Google sends an e-mail when a sale is made (or when something goes wrong with a payment), and it stores some detail in your dashboard. You can use the date or the number to Poll for the rest of the details. Exactly how to do that is lacking in the on-line documentation.
Use the merchant-private-data field to pass any custom data about your order.
When you get back the notification, read the custom info from the merchant-private-data field.
See this answer for a solution to a similar issue.