Skip to content

Commit

Permalink
Add <plugin> information to direct transaction request message.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Mar 7, 2024
1 parent 523aba5 commit 880676c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/XML/DirectTransactionRequestMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,26 @@ public function __construct( Merchant $merchant, Customer $customer, Transaction
public function get_document() {
$document = parent::get_document();

// Plugin - Information about your integration (useful for debugging).
$plugin = XML_Util::add_element( $document, $document->documentElement, 'plugin' );

XML_Util::add_elements(
$document,
$plugin,
[
// The name of your ecommerce application.
'shop' => \get_bloginfo( 'name' ),
// The version of your ecommerce application.
'shop_version' => \get_bloginfo( 'version' ),
// The version of your integration.
'plugin_version' => \pronamic_pay_plugin()->get_version(),
// The name of the third party that developed the ecommerce application (if relevant).
'partner' => 'Pronamic',
// The root/base URL of the ecommerce application.
'shop_root_url' => \get_bloginfo( 'url' ),
]
);

// Merchant.
$merchant = XML_Util::add_element( $document, $document->documentElement, 'merchant' );

Expand Down

0 comments on commit 880676c

Please sign in to comment.