Skip to main content

Payments via Seller-API

Notify receipt of payment

During this process, your Shop notifies Channel Pilot Pro about the successful receipt of payment.

Sample implementation of the payment receipt confirmation:

$paidOrders= array();
$order = new CPOrder();
$order->orderHeader = new CPOrderHeader("TEST_ORDER_ID_MARKETPLACE", "TEST_ORDER_ID_SHOP-1", "marketplace_1", 20, false, null);
$order->payment = new CPPayment("2014-05-28T09:15:56+02:00");
$paidOrders[] = $order;

$api = new ChannelPilotSellerAPI_v1_0("cpMerchantId", "cpApiToken");
$result = $api->setPaidOrders($paidOrders);

API-Function - SETPAIDORDERS()

$result = $api->setPaidOrders($paidOrders);

To report the successful receipt of payment for the orders to Channel Pilot Pro there is the function "setPaidOrders()".

Here CPOrder-Objects with a CPOrderHeader-Object and a CPPayment-Object are transmitted to ChannelPilot. The CPPayment-Object must contain a paymentTime.

SOAP-UI description and samples for this function can be found here.

Sample data request:

[{
"orderHeader": {
"orderId":"TEST_ORDER_ID_SHOP",
"orderIdExternal": "TEST_ORDER_ID_MARKETPLACE-1",
"source": "marketplace_1",
"status": {
"identifier": "20",
"hasError": false
}
},
"payment": {
"paymentTime": "2014-05-28T09:15:56+02:00"
}
}]

The response contains the old status of the order or an error message.

Sample data response:

{
"updateResults":[{
"orderHeader":{
"orderId":"TEST_ORDER_ID_SHOP",
"orderIdExternal": "TEST_ORDER_ID_MARKETPLACE",
"source":"marketplace_1",
"status":{
"identifier":"20",
"publicTitle":"Importiert",
"publicDescription":"The orders are imported into the shop. The order should be delivered now.",
"hasError":false
},
"orderTime":"2014-06-04T12:40:11+02:00"
},
"header":{
"resultCode":200,
"resultMessage":""
}
}],
"header":{
"resultCode":200,
"resultMessage":""
}
}
Did this answer your question?