Trying to pass $Value into my Checkout page

EasyBeeMan
Contributor
Contributor

Trying to pass the dollar value from Page 1 into Page 2 (CreateOrder Page)

Code:

<script>var m_PassedPrice1 = GlobalClass.g_PassedPrice </script>

 

createOrder: (data, actions) => {
// pass in any options from the v2 orders create call:
// https://developer.paypal.com/api/orders/v2/#orders-create-request-body
const createOrderPayload = {
purchase_units: [
{
item: {
referance_id: 'PS101',
name: 'ProServe 2012',
description: 'Single User Package'
},
amount: {
currency_code: 'USD',
// name: 'ProServe 2012',
// description: 'Single User Package',
// value: '395.00',
// value: '<?php m_PassPrice.Text ?>',
value: m_PassedPrice1, },

 

// The above code in RED is what I'm trying to pass into from calling page, I have the Value that is passed within a Request.Form()

 

Any advice would be appreciated 

 

Login to Me Too
1 REPLY 1

EasyBeeMan
Contributor
Contributor

I figured it out.

 

I setup a hidden Label called j_LabelPrice and stored the passing value in that Label

value: (<%=j_LabelPrice.Text%>),

 

That's seems to work.

 

 

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.