Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

A feature is nothing more than a bug with seniority. -- Unknown source


devel / comp.lang.javascript / Re: javascript variables on PayPal button

SubjectAuthor
* javascript variables on PayPal buttonDaniele Ferrarese
+- Re: javascript variables on PayPal buttonKristjan Robam
`- Re: javascript variables on PayPal buttonAce of diamonds

1
javascript variables on PayPal button

<9a75165d-d844-4a64-bc55-83f10ac68f91n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17668&group=comp.lang.javascript#17668

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a37:902:0:b0:60d:fc23:3e03 with SMTP id 2-20020a370902000000b0060dfc233e03mr2776800qkj.464.1646405537170;
Fri, 04 Mar 2022 06:52:17 -0800 (PST)
X-Received: by 2002:a05:6808:118d:b0:2cc:ef90:3812 with SMTP id
j13-20020a056808118d00b002ccef903812mr9607469oil.48.1646405536814; Fri, 04
Mar 2022 06:52:16 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Fri, 4 Mar 2022 06:52:16 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=87.5.255.128; posting-account=NVj8SAoAAABoBtIGGM_xDp1m0edQH1iG
NNTP-Posting-Host: 87.5.255.128
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9a75165d-d844-4a64-bc55-83f10ac68f91n@googlegroups.com>
Subject: javascript variables on PayPal button
From: daniele.rescogitans@gmail.com (Daniele Ferrarese)
Injection-Date: Fri, 04 Mar 2022 14:52:17 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 57
 by: Daniele Ferrarese - Fri, 4 Mar 2022 14:52 UTC

A greeting to all participants in the NG

I'm trying to insert the HTML code, from PayPal, to insert a button "bynow" on my ecommerce (see code)

<div id="smart-button-container">
<div style="text-align: center;">
<div id="paypal-button-container"></div>
</div>
</div>
<script src="https://www.paypal.com/sdk/js?client-id=my_id&enable-funding=venmo&currency=EUR" data-sdk-integration-source="button-factory"></script>
<script>
function initPayPalButton() {
paypal.Buttons({
style: {
shape: 'rect',
color: 'gold',
layout: 'vertical',
label: 'paypal',

},

createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{"description":"Order N.","amount":{"currency_code":"EUR","value":10}}]
});
},

onApprove: function(data, actions) {
return actions.order.capture().then(function(orderData) {

// Full available details
console.log('Capture result', orderData, JSON.stringify(orderData, null, 2));

// Show a success message within this page, e.g.
const element = document.getElementById('paypal-button-container');
element.innerHTML = '';
element.innerHTML = '<h3>Thank you for your payment!</h3>';

// Or go to another URL: actions.redirect('thank_you.html');

});
},

onError: function(err) {
console.log(err);
} }).render('#paypal-button-container');
} initPayPalButton();
</script>

trying to replace "description:Order N." with a variable $_SESSION['customer_id'], and total EUR 10 with variable $_SESSION['total_order'] already in my checkout page. I'm not able to find the right syntax.
Besides I would like, if payment success, activate function "validateForm()" which is sending all records to database.

Thank you for help.
Rgds.
Daniele

Re: javascript variables on PayPal button

<23fdda7e-cb51-4b3c-949e-47f1477479e5n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17704&group=comp.lang.javascript#17704

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a05:6214:21a7:b0:441:1434:eafd with SMTP id t7-20020a05621421a700b004411434eafdmr16380950qvc.77.1649070419329;
Mon, 04 Apr 2022 04:06:59 -0700 (PDT)
X-Received: by 2002:a05:6870:460f:b0:dd:cd0e:d931 with SMTP id
z15-20020a056870460f00b000ddcd0ed931mr11108208oao.196.1649070419050; Mon, 04
Apr 2022 04:06:59 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Mon, 4 Apr 2022 04:06:58 -0700 (PDT)
In-Reply-To: <9a75165d-d844-4a64-bc55-83f10ac68f91n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=193.40.120.146; posting-account=JEMYqwoAAADm_ixjLuCjmrPjjrta833N
NNTP-Posting-Host: 193.40.120.146
References: <9a75165d-d844-4a64-bc55-83f10ac68f91n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <23fdda7e-cb51-4b3c-949e-47f1477479e5n@googlegroups.com>
Subject: Re: javascript variables on PayPal button
From: he6655442211@hotmail.com (Kristjan Robam)
Injection-Date: Mon, 04 Apr 2022 11:06:59 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 76
 by: Kristjan Robam - Mon, 4 Apr 2022 11:06 UTC

Something for You.

Can You help me out with 2100 euros ?

I want to buy a new Iphone.

Kristjan Robam

Daniele Ferrarese kirjutas Reede, 4. märts 2022 kl 16:52:27 UTC+2:
> A greeting to all participants in the NG
>
> I'm trying to insert the HTML code, from PayPal, to insert a button "bynow" on my ecommerce (see code)
>
> <div id="smart-button-container">
> <div style="text-align: center;">
> <div id="paypal-button-container"></div>
> </div>
> </div>
> <script src="https://www.paypal.com/sdk/js?client-id=my_id&enable-funding=venmo&currency=EUR" data-sdk-integration-source="button-factory"></script>
> <script>
> function initPayPalButton() {
> paypal.Buttons({
> style: {
> shape: 'rect',
> color: 'gold',
> layout: 'vertical',
> label: 'paypal',
>
> },
>
> createOrder: function(data, actions) {
> return actions.order.create({
> purchase_units: [{"description":"Order N.","amount":{"currency_code":"EUR","value":10}}]
> });
> },
>
> onApprove: function(data, actions) {
> return actions.order.capture().then(function(orderData) {
>
> // Full available details
> console.log('Capture result', orderData, JSON.stringify(orderData, null, 2));
>
> // Show a success message within this page, e.g.
> const element = document.getElementById('paypal-button-container');
> element.innerHTML = '';
> element.innerHTML = '<h3>Thank you for your payment!</h3>';
>
> // Or go to another URL: actions.redirect('thank_you.html');
>
> });
> },
>
> onError: function(err) {
> console.log(err);
> }
> }).render('#paypal-button-container');
> }
> initPayPalButton();
> </script>
>
> trying to replace "description:Order N." with a variable $_SESSION['customer_id'], and total EUR 10 with variable $_SESSION['total_order'] already in my checkout page. I'm not able to find the right syntax.
> Besides I would like, if payment success, activate function "validateForm()" which is sending all records to database.
>
>
> Thank you for help.
> Rgds.
> Daniele

Re: javascript variables on PayPal button

<a4bd8d0c-aa00-4a55-a020-abfd3db8cdddn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17843&group=comp.lang.javascript#17843

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a05:6214:62a:b0:472:eac1:7565 with SMTP id a10-20020a056214062a00b00472eac17565mr17259528qvx.71.1657124302136;
Wed, 06 Jul 2022 09:18:22 -0700 (PDT)
X-Received: by 2002:a05:6808:6d7:b0:325:67ff:a21b with SMTP id
m23-20020a05680806d700b0032567ffa21bmr23871224oih.105.1657124300776; Wed, 06
Jul 2022 09:18:20 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Wed, 6 Jul 2022 09:18:20 -0700 (PDT)
In-Reply-To: <9a75165d-d844-4a64-bc55-83f10ac68f91n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=82.131.37.215; posting-account=HfIszAoAAAC8ch6q3uChpTWUALHCfEoF
NNTP-Posting-Host: 82.131.37.215
References: <9a75165d-d844-4a64-bc55-83f10ac68f91n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a4bd8d0c-aa00-4a55-a020-abfd3db8cdddn@googlegroups.com>
Subject: Re: javascript variables on PayPal button
From: he12091983@gmail.com (Ace of diamonds)
Injection-Date: Wed, 06 Jul 2022 16:18:22 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 72
 by: Ace of diamonds - Wed, 6 Jul 2022 16:18 UTC

Hey guy. Would You want to get rich with me doing programming? If yes, call me !!!!!!!!!

✆☎☏📱📞 : 372 53900660

Daniele Ferrarese kirjutas Reede, 4. märts 2022 kl 16:52:27 UTC+2:
> A greeting to all participants in the NG
>
> I'm trying to insert the HTML code, from PayPal, to insert a button "bynow" on my ecommerce (see code)
>
> <div id="smart-button-container">
> <div style="text-align: center;">
> <div id="paypal-button-container"></div>
> </div>
> </div>
> <script src="https://www.paypal.com/sdk/js?client-id=my_id&enable-funding=venmo&currency=EUR" data-sdk-integration-source="button-factory"></script>
> <script>
> function initPayPalButton() {
> paypal.Buttons({
> style: {
> shape: 'rect',
> color: 'gold',
> layout: 'vertical',
> label: 'paypal',
>
> },
>
> createOrder: function(data, actions) {
> return actions.order.create({
> purchase_units: [{"description":"Order N.","amount":{"currency_code":"EUR","value":10}}]
> });
> },
>
> onApprove: function(data, actions) {
> return actions.order.capture().then(function(orderData) {
>
> // Full available details
> console.log('Capture result', orderData, JSON.stringify(orderData, null, 2));
>
> // Show a success message within this page, e.g.
> const element = document.getElementById('paypal-button-container');
> element.innerHTML = '';
> element.innerHTML = '<h3>Thank you for your payment!</h3>';
>
> // Or go to another URL: actions.redirect('thank_you.html');
>
> });
> },
>
> onError: function(err) {
> console.log(err);
> }
> }).render('#paypal-button-container');
> }
> initPayPalButton();
> </script>
>
> trying to replace "description:Order N." with a variable $_SESSION['customer_id'], and total EUR 10 with variable $_SESSION['total_order'] already in my checkout page. I'm not able to find the right syntax.
> Besides I would like, if payment success, activate function "validateForm()" which is sending all records to database.
>
>
> Thank you for help.
> Rgds.
> Daniele


devel / comp.lang.javascript / Re: javascript variables on PayPal button

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor