Skip to content

Commit

Permalink
Merge pull request #6 from pronamic/5-add-plugin-information-to-redir…
Browse files Browse the repository at this point in the history
…ect-transaction-request

Add plugin information to `RedirectTransactionRequestMessage`.
  • Loading branch information
rvdsteege authored Sep 2, 2024
2 parents 8f998d4 + df83462 commit a4c76a6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/XML/RedirectTransactionRequestMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,26 @@ public function __construct( $merchant, $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' => 'WordPress - Pronamic Pay',
// 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 a4c76a6

Please sign in to comment.