Hi!
In our shop some keys can be delivered to customers by courier and final payment occurs at the home. So there may be cases of fraud, because customer can see keys in his account.
How can I set up generating keys for admins if order status is "processing"? But these keys should not showing for a customers until a status is not changing to "complete".

I hope you understand me :)

Comments

freixas’s picture

Yes, I understand you.

I believe you can do this, but you'll need to write a small module. If you are not a programmer, you will have to find one.

Let's assume that these key are paid for using the C.O.D. (Collect on Delivery) payment method. When you receive this type of order, you will call a function that will assign the keys form the order just as it normally would except that the user will be user 1 (or some other UID that refers to an administrator). This could be done by temporarily changing the order's UID to 1 and restoring it afterward. The administrator will received the keys by email and the keys will also show up in his profile.

Send the keys to the user and wait for notification of payment. When you know the payment has been made, you will call another small function that will change the owner of a product key to the user listed in the order.

Mark the order complete. Since all the keys were assigned to the administrator in the first step, the order contains no unassigned keys and, therefore, marking the order complete will not re-issue the keys.

alexd73’s picture

algorithm is clear.
Thank you!

freixas’s picture

Status: Active » Closed (won't fix)

Closed due to no activity in over 2 weeks.