Skip to content

Patch/add referrer url - #111

Merged
tubiz merged 8 commits into
PaystackOSS:release/5.8.3from
tolu-paystack:patch/add-referrer-url
Dec 2, 2024
Merged

Patch/add referrer url#111
tubiz merged 8 commits into
PaystackOSS:release/5.8.3from
tolu-paystack:patch/add-referrer-url

Conversation

@tolu-paystack

Copy link
Copy Markdown
Contributor

Adds the url of the store that initialized a transaction as referrer in the transaction metadata. This helps with tracking where payments came from, particularly useful in the event that API keys have been compromised and are being used from a site other than the merchant's store.

@tubiz
tubiz changed the base branch from master to release/5.8.3 November 9, 2024 19:48
Comment thread includes/class-wc-gateway-paystack.php Outdated

$paystack_params['metadata']['custom_fields'] = $this->get_custom_fields( $order_id );
$paystack_params['metadata']['cancel_action'] = wc_get_cart_url();
$paystack_params['metadata']['referrer'] = get_permalink(wc_get_page_id('shop'));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of the shop URL, can you switch it to the site url instead esc_url( site_url() )

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated @tubiz

@tubiz
tubiz merged commit f2af4ae into PaystackOSS:release/5.8.3 Dec 2, 2024
@tubiz tubiz linked an issue Dec 2, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add referrer URL

2 participants