Changing the status of an order in Magento 2 via the REST API - rest

Does anyone know how to change the status of an existing order in Magento 2 via the REST API? We are interfacing order status back to Magento via the REST API from a .net application (we are using JSON.net). I'm able to create shipments, invoice items on the order, and even create credit memos, but I can't seem to change the order status.
Our customer service people use the Magento admin in the call center for order entry and answering customer questions over the phone. Having the correct order status displayed it very important for them.
Thanks in advance.
Bruce

Related

Magento 2 how can i add custom functionality to this rest API rest/v1/products/:sku | PUT

As I am new in Magento 2 and I want to add custom functionality to this API like when this API hit wants to delete all previous tier price record of this product.
Can anyone help me to achieve this?

Stripe integration with iOS: Saving and referencing saved cards

I'm trying to make an app that sells a service, for which users pay based on the amount of time they've used it for, so I don't have a physical shipping address involved.
I want to be able to allow my users to save and then reference saved cards in future transactions. I know the way Stripe tracks a specific customer is through a customer_id, but I'm not sure how to attach a card to a specific customer_id and then reference it in future.
Also, I'm a little confused on the use of ephemeral_keys. Some Stripe tutorials talk about needing these on the server side, and some don't mention them at all, and that leaves me very confused.
This one talks about ephemeral_keys while creating a paymentIntent: https://stripe.com/docs/mobile/ios/basic#
And this one doesn't: https://stripe.com/docs/payments/integration-builder
Any help would be greatly appreciated! Please let me know if you need any more information from me.
PS: If you could also point me to some of the relevant View Controllers Stripe uses to save new cards and display saved cards, I'd be more than grateful!
The flow on https://stripe.com/docs/mobile/ios/basic includes the Customer for your payment context, which will cause the created PaymentMethod to be attached to that Customer. You can verify this after the initial payment by retrieving the PaymentMethod on your backend with your secret key and checking its customer field [0].
If you have a PaymentMethod and want to attach it to a Customer, you'd use the API on the backend [1].
You can retrieve a list of the Customer's existing PaymentMethods via the API [2] on the backed as well (again, with your secret key). Then you can pass a list of their id's and some identifying feature (last 4 digits, as an example) to your app in order to display and let the customer select the one they want to use. Then you take that PaymentMethod's 'id' and use it to create the new payment.
Ephemeral keys are usually only used with the iOS (or Android) SDK's, so when you're using the backend of your integration (i.e. the part that is running on a server somewhere and not distributed with your app) you generally don't need to worry about them.
[0] https://stripe.com/docs/api/payment_methods/retrieve
[1] https://stripe.com/docs/api/payment_methods/attach
[2] https://stripe.com/docs/api/payment_methods/list

Notifying a customer via email when order status changed to shipped with BigCommerce API

When you change the Order status to Shipped in BigCommerce, you can put in the Tracking ID and click on the check box that says "update the order status to Shipped, and notify the customer via email". This works perfectly when I'm logged in an typing manually.
If however, I create a shipment using the BigCommerce API with CURL, I don't see any way to cause the customer notification email to be sent. I have searched every place I can think of, and there doesn't seem to be anything in the API specifications or online help. I can update shipped quantities and Tracking ID just fine.
Is there a way to also send the Shipped notification via email to the customer when using the API?
If you can create a shipment via API, that should update the order status to shipped or partially shipped which will trigger an email depending on store settings (listed under Checkout in the control panel).

Bigcommerce Custom Emails

When the order status of an order in Bigcommerce is changed, it sends out an email using the template order_status_email.
I want it to send out 2 emails when this happens. (that default email, and another custom email template)
Is there a way to use the API or customize my store to send out an custom email when the order status is changed?
You'd have to set up your own system to send out the email, but you can access order statuses through the API no problem. Docs can be found here: https://developer.bigcommerce.com/api/objects/v2/order_status
I'd recommend working with the webhooks feature, it'll make this a lot easier.
https://developer.bigcommerce.com/api/webhooks

Virtuemart 2 Order confirmation before payment

I'm using VM 2.0.6 and Joomla 2.5 and the Multisafepay payment gateway.
Whenever a user puts a product in his cart, and clicks on checkout, the user is send to another page completely (Multisafepay's website, so not VM anymore) where he can select his desired payment option - same thing as paypal for example. But, at that time, Virtuemart is already sending an e-mail to the user confirming his order. That e-mail is saying: Thank you for your order blabla, the status of your order is blank..
So, VM is already sending an e-mail before the user payed.
Does anybode relate to this or knows an answer?
VM 2.0.6 is working like this :
when the order is placed that means any one of the shipping and payment method is selected.
and cart have valid data it will create the order and send an email to the user that mentioned
an order has been placed.
You can change
the sending mail section if you need.
One function name with notifyemail (iam not sure the name but it start with notify) in the path:
administrator/components/com_virtuemart/models/orders.php
you can check all your required things like shipping /payment methods are selected before calling this function.
the function should be initiate from cart.php controller in front end.
You can change the point where an invoice copy is sent to the customer in the Store Configuration. Look for Configuration > check out > Default Order Status to send an invoice and make sure you have the Confirmed status chosen.