Please use cURL (w cookies) to fulfill this task.
1.) Add product(s) (identified by ASIN; usually 1-3) to cart. e.g. B0043VUHXC
2.) Proceed to Checkout
3.) Login
3.) Modify an existing Shipping Address. Function should take an $address with all details ['full_name'], ['address_line1'], ['country'] etc...
4.) Amazon might try to correct if the address seems incorrect (e.g. put ZIP 90503 and State FL, amazon will correct to CA). choose maintain original address.
5.) Choose the first shipping option (please make sure not to use fixed string as this needs to work on all amazon sites); option: This is a Gift
6.) Enter message in gift box "Thank you very much!!"
7.) Amazon will always prompt to enter Payment Information. Put credit card number, name, expiration date, card type, confirmation code. Click add card. Continue.
8.) Final confirmation page. Please compare/confirm we have the right item(s) and address here. This is important as amazon might change the site and we might submit incorrect or incomplete data. Also save the total amount charged (shipping+handling) into a variable. If everything is fine Submit order.
=> Please do proper error handling. Amazon might change their functioning and the script might stop working. In this case I want to be informed by the script about the problem.
=> Sometimes an address may contain a big error (like zip not matching state) and amazon might not accept the address at all even if we choose to maintain it. In this case I want to abort and be informed about the address problem.
=> I want to be able to output each amazon response for debug purposes.
=> This should work with different amazon sites (USA, Germany, Italy, France, UK). They all work the same way just have different strings. So please make sure to not work with any particular language , instead rely on the label names etc.
=> Code should be easy to maintain.