Skip to content

Commit

Permalink
PayPal Insights Integration, ref #904
Browse files Browse the repository at this point in the history
  • Loading branch information
kcppdevelopers committed Nov 12, 2017
1 parent 7849164 commit 380dc81
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions paypal-for-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -1122,9 +1122,11 @@ public static function wp_paypal_paypal_marketing_solutions_generate_cid() {
$cid_production = '';
$result = array();
if( !empty($_POST['action']) && $_POST['action'] == 'wp_paypal_paypal_marketing_solutions_generate_cid' ) {
$website_url = get_bloginfo('url');
//$website_url = get_bloginfo('url');
$website_url = 'https://www.flipkart.com/';
$website_name = get_bloginfo('name');
$website_url = str_ireplace('www.', '', parse_url($website_url, PHP_URL_HOST));
$post = '{"owner_id": "woocommerce_container","owner_type": "PAYPAL","application_context": {"terms_accepted": true,"bn_code": "AngellEYE_SP_MarketingSolutions","partner_name": "Angell EYE"},"name":"woocommerce_container","description":"Container created from WooCommerce plugin","url":"' . $website_url . '","published":true,"tags":[{"tag_definition_id":"credit","enabled":true,"configuration":[{"id":"analytics-id","value":"abcd-1"},{"id":"variant","value":"slide-up"},{"id":"flow","value":"credit"},{"id":"limit","value":"3"}]}]}';
$post = '{"owner_id": "woocommerce_container","owner_type": "PAYPAL","application_context": {"terms_accepted": true,"bn_code": "AngellEYE_SP_WooCommerce_MS","partner_name": "' . $website_name . '"},"name":"woocommerce_container","description":"Container created from PayPal for WooCommerce plugin","url":"' . $website_url . '","published":true,"tags":[{"tag_definition_id":"credit","enabled":true,"configuration":[{"id":"analytics-id","value":"abcd-1"},{"id":"variant","value":"slide-up"},{"id":"flow","value":"credit"},{"id":"limit","value":"3"}]}]}';
$headers = array(
'Accept: application/json',
'Content-Type: application/json',
Expand Down

1 comment on commit 380dc81

@angelleye
Copy link
Collaborator

Choose a reason for hiding this comment

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

@kcppdevelopers Why did you change get_bloginfo('url') to a static value of flipkart.com?

Please sign in to comment.