-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
+Payment, PaymentTerm, PaymentService #41
Merged
Merged
Changes from 3 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
b99c7d6
+Payment, PaymentTerm, PaymentService
mathielen 6855c48
* DtdValidator can be instantiated with custom dtds
mathielen 3ab1344
* Ability to provide custom dtd to serializer
mathielen c41e72d
documentation & cleanup
mathielen eeb2da4
Payment Extension
mathielen d6dd0bd
PaymentToken + PCard
mathielen dd25547
move to public readonly properties
mathielen dedfd19
phpstan
mathielen ad02e00
sharedSecret should be settable
mathielen bb85e1b
Customize CXML
mathielen 55ba59a
Customize CXML
mathielen 23abfea
Customize CXML
mathielen 8c170db
Customize CXML
mathielen 2a1f46c
Customize CXML
mathielen 9efb22f
Customize CXML
mathielen 8c651a5
Customize CXML
mathielen 37d0ce6
Payment Extension
mathielen 3a3295c
Payment Extension
mathielen 39b5f8c
remove unnecessary break
mathielen 85af7c2
+PaymentTerm
mathielen fedb8e2
+PaymentTerm
mathielen 2ac4323
setable /w null
mathielen 39e60d1
no more getters
mathielen d1b0393
+idReferences
mathielen e5ed997
check for type of OrderRequestHeader
mathielen 5bd07c9
check for type of OrderRequestHeader
mathielen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace CXml\Model; | ||
|
||
use JMS\Serializer\Annotation as Serializer; | ||
|
||
class Payment | ||
{ | ||
public function __construct( | ||
#[Serializer\XmlElement] | ||
#[Serializer\SerializedName('PaymentService')] | ||
private PaymentService $paymentService, | ||
) { | ||
} | ||
|
||
public function getPaymentService(): PaymentService | ||
{ | ||
return $this->paymentService; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace CXml\Model; | ||
|
||
use JMS\Serializer\Annotation as Serializer; | ||
|
||
class PaymentService | ||
{ | ||
use IdReferencesTrait; | ||
use ExtrinsicsTrait; | ||
|
||
public function __construct( | ||
#[Serializer\XmlAttribute] | ||
readonly private string $method, | ||
#[Serializer\XmlAttribute] | ||
readonly private ?string $provider = null, | ||
) { | ||
} | ||
|
||
public function getMethod(): string | ||
{ | ||
return $this->method; | ||
} | ||
|
||
public function getProvider(): ?string | ||
{ | ||
return $this->provider; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace CXml\Model; | ||
|
||
use JMS\Serializer\Annotation as Serializer; | ||
|
||
class PaymentTerm | ||
{ | ||
use ExtrinsicsTrait; | ||
|
||
public function __construct( | ||
#[Serializer\XmlAttribute] | ||
private int $payInNumberOfDays, | ||
) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.060/cXML.dtd"> | ||
<cXML payloadID="1737963337.319.1846511.7249@eu-hub" timestamp="2025-01-27T07:35:37+00:00"> | ||
<Header> | ||
<From> | ||
<Credential domain="NetworkId"> | ||
<Identity>AN00000123</Identity> | ||
</Credential> | ||
</From> | ||
<To> | ||
<Credential domain="NetworkId"> | ||
<Identity>AN00000456</Identity> | ||
</Credential> | ||
</To> | ||
<Sender> | ||
<Credential domain="NetworkId"> | ||
<Identity>AN00000123</Identity> | ||
<SharedSecret>Secret!123</SharedSecret> | ||
</Credential> | ||
<UserAgent>Suppliers Super Order Processor</UserAgent> | ||
</Sender> | ||
</Header> | ||
<Request deploymentMode="test"> | ||
<OrderRequest> | ||
<OrderRequestHeader orderID="acme-1-1" orderDate="2025-01-27T07:35:36+00:00" type="new" requestedDeliveryDate="2025-01-28T23:00:00+00:00"> | ||
<Total> | ||
<Money currency="USD">10.00</Money> | ||
</Total> | ||
<ShipTo> | ||
<Address> | ||
<Name xml:lang="en">TEST.USA ACME</Name> | ||
<PostalAddress> | ||
<DeliverTo>ACME</DeliverTo> | ||
<DeliverTo>TEST.USA</DeliverTo> | ||
<Street>22 E 4th Ave</Street> | ||
<City>Columbus</City> | ||
<State>OH</State> | ||
<PostalCode>43201-3551</PostalCode> | ||
<Country isoCountryCode="US">United States</Country> | ||
<Extrinsic name="phone">+49121255566</Extrinsic> | ||
</PostalAddress> | ||
</Address> | ||
</ShipTo> | ||
<BillTo> | ||
<Address> | ||
<Name xml:lang="en">TEST.USA ACME</Name> | ||
<PostalAddress> | ||
<DeliverTo>ACME</DeliverTo> | ||
<DeliverTo>TEST.USA</DeliverTo> | ||
<Street>22 E 4th Ave</Street> | ||
<City>Columbus</City> | ||
<State>OH</State> | ||
<PostalCode>43201-3551</PostalCode> | ||
<Country isoCountryCode="US">United States</Country> | ||
</PostalAddress> | ||
</Address> | ||
</BillTo> | ||
<Payment> | ||
<PaymentService method="cc" provider="stripe"> | ||
<IdReference identifier="ch_..." domain="charge_id"/> | ||
<IdReference identifier="pi_..." domain="intent_id"/> | ||
</PaymentService> | ||
</Payment> | ||
</OrderRequestHeader> | ||
<ItemOut lineNumber="1" quantity="1"> | ||
<ItemID> | ||
<SupplierPartID>QA-ACME-AUTOTEST</SupplierPartID> | ||
<BuyerPartID>QA-ACME-AUTOTEST</BuyerPartID> | ||
</ItemID> | ||
<ItemDetail> | ||
<UnitPrice> | ||
<Money currency="USD">10.00</Money> | ||
</UnitPrice> | ||
<Description xml:lang="en">Testing</Description> | ||
<UnitOfMeasure>EA</UnitOfMeasure> | ||
<Classification domain="supplier_part_id">QA-ACME-AUTOTEST</Classification> | ||
</ItemDetail> | ||
</ItemOut> | ||
</OrderRequest> | ||
</Request> | ||
</cXML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why you deleted this serializer property?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whats the need?