baltpeter / internetmarke-php Goto Github PK
View Code? Open in Web Editor NEWA PHP wrapper for the Deutsche Post Internetmarke web service 1C4A ("OneClickForApplikation")
License: MIT License
A PHP wrapper for the Deutsche Post Internetmarke web service 1C4A ("OneClickForApplikation")
License: MIT License
Besides the fix in #3, the following example still leads to a crash [soap:Client] Unmarshalling Error: cvc-complex-type.3.2.2: Attribute 'id' is not allowed to appear in element 'ns1:positions'
$order_item = new \baltpeter\Internetmarke\OrderItem(1, null, null,
new \baltpeter\Internetmarke\Position(1, 1, 1), 'FrankingZone');
$x = $service->checkoutShoppingCartPNG($user_token, [$order_item,$order_item], 160);
I also don't know how to fix it, besides just making a deep copy like this:
public function checkoutShoppingCartPng($user_token, $positions, $total, $shop_order_id = null,
$ppl_id = null, $create_manifest = null, $create_shipping_list = null) {
$distinct_positions = [];
foreach ($positions as $position) {
$distinct_positions[] = deep_copy($position);
}
$result = $this->__soapCall('checkoutShoppingCartPNG', array('CheckoutShoppingCartPNGRequest' => array(
'userToken' => $user_token, 'shopOrderId' => $shop_order_id, 'ppl' => $ppl_id, 'positions' => $distinct_positions,
'total' => $total, 'createManifest' => $create_manifest, 'createShippingList' => $create_shipping_list
)));
Maybe I overlook something, but isn't the error only appearing in
checkoutShoppingCartPdf
and checkoutShoppingCartPng
? If thats the case, we could get rid of all deep copy calls that where introduced in #3.
If thats correct, then I could make a PR to fix it.
Hey,
I tested the example and want to use this service to order some stamps. But I experienced that countries do not show up in the final stamp. My code looks like this Example in the Wiki.
How to fix this issue?
Best regards
Niels
Hi,
I noticed that checkoutShoppingCartPng returns a stdClass. When one wants to access the png or png's, then this is a difficult task, because the stdClass only points to a zip file.
I thought maybe we could replace the stdClass with a proper class that contains a method to unzip it and returns an array of the url's to the pictures. As a parameter one would have to give a path to the directory where the images and the zip file should be unzipped. And the new class should be so, that it does not break old code.
Shall I create a PR for this or do you not like it?
Hallo,
ist es möglich auch Zusatzleistungen wie Einschreiben zu buchen?
Ich denke man müsste dann eine andere ProductId übergeben.
Gibt es einen Weg die Ids auszulesen?
Hey,
thank you for this awesome package, it was helping me a lot.
I noticed that there is no class for "Portokasse laden" (see Technische Beschreibung page 15).
I think its useful to have such a class with all properties that are relevant for the form and a method to compute the special signature. Shall I add this as a PR or do you not want this is in your project?
Hello,
can somebody help me, how can i get availible products from ProdWs, which header paramaeters i have to send is the mandant id same like the Partner ID, example request with headers an endpoint pls.
BR
DHL are now also providing the INTERNETMARKE API connection as a REST-API for business customers. Further information and the required documents can be found in the Developer Portal:
Deutsche Post INTERNETMARKE (Post & Parcel Germany) (dhl.com)
The advantages of the new REST-API at a glance:
Please note that the **SOAP-API will be switched off on 31.12.2025 (**please see the Deprecation Schedule).
Hello,
I would like 24 labels with sender and receiver adress included on the label per page, but i not found pre defined label format that i get with retrievePageformats method where this is possible with adress, the documentation of the Internetmarke api says that custom pageformats mot possible, so i think i have to produce 24 labels for e.g. Brother defined label and merge it by me to a A4 Pdf Page, knows somebody a better smarter solution, pls help.
I'm unable to find the definition for the Product_Code List.
So in OrderItem, ProductCode 1 is a 0,80€ Letter?
What ProductCode would a 1,45€ Letter be?
org.xml.sax.SAXParseException; cvc-complex-type.3.2.2: Attribute 'id' is not allowed to appear in element 'ns1:address'
$this->service->checkoutShoppingCartPdf
(
$this->token,
108,// Zweckform 3659 Etiketten 97 x 42.3
[
new \baltpeter\Internetmarke\OrderItem
(
21,
null,
$address_binding,
new \baltpeter\Internetmarke\Position(1, 1, 1),
'AddressZone'
),
new \baltpeter\Internetmarke\OrderItem
(
21,
null,
$address_binding,
new \baltpeter\Internetmarke\Position(2, 1, 1),
'AddressZone'
)
],
(145 * 2)
);
Hi,
why would you use a form to then redirect users to the payment page? Why not just directly redirect to the payment page?
Hello,
is there an example how to use the unzipPNG function?
Thank you.
Best Regards,
Dieter
it works perfekt with one order item, but if i try to add more in the array i get an error message!
Fatal error: Uncaught SoapFault exception: [soap:Server] Checkout shopping cart failed
How i can fix this problem?
thanks a lot!
hiho, we got a 503 error, after our portokasse was switchet to "Postpaid" (from '"prepaid" i think). with prepaid your class worked well. is there a context?
regards and many thanks
joey
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.