I want to send a message to eBay customers (via eBay messenger) after they have purchased an item. I am selling digital codes for xbox one and making an auto delivery system. I’ve seen this done before so I know it’s possible.
I’ve been looking into it and I’ve came across AddMemberMessageAAQToPartner but I don’t know how to use this in PHP. The only supported API’s on the website are Java and C#, for some reason eBay doesn’t use PHP.
I have already made PayPal IPN so I know when a customer buys a product, I can use this to send an email but I’d rather send a direct eBay message.
2
Answers
You can take a look at eBay’s documentation for AddMemberMessageAAAQToPartner to get a look at a sample of the XML request and whatever parameters are available.
All you need to do is generate an XML string and then POST it to eBay’s API endpoint using cURL. There are some headers that you’ll need to pass for API credentials, but that’s all covered eBay’s general “Making a Call” documentation.
I have created a SDK that enables people to use the eBay API in their PHP projects. If you are familiar with Composer it can be installed with,
The example below shows how the SDK can be used to call AddMemberMessageAAQToPartner. More information about the SDK is also available.