Jump to content

Paypal Shopping cart custom create order objects and user details


exceedinglife
 Share

Recommended Posts

I have a shopping cart that holds an array or my objects. I have all my customer user details serialized with a form and jQuery. I would like to insert the user data I got from my user details form (maybe I use payer or payer_info? Object. Also I would like to insert my items to the paypal

CreateOrder:        actions.order.create({


I am guessing I do it like this?

"item_list": {
"items": [
{
"name": "hat",
"description": "Brown color hat",
"quantity": "5",
"price": "3",
"tax": "0.01",
"sku": "1",
"currency": "USD"
},
{
"name": "handbag",
"description": "Black color hand bag",
"quantity": "1",


OR maybe in

This is what I have

    $fname = $_POST['txtFirstname'];
    $lname = $_POST['txtLastname'];
    $email = $_POST['txtEmail'];
var totalPrice = <?php echo $newTotal; ?>
	paypal.Buttons({
    createOrder: function(data, actions) {
        // setup transaction
        return actions.order.create({
            payer: {
                name:
            },
            purchase_units: [{
               amount: {
                   value: totalPrice
               } 
            }]
        });
    },

Link to comment
Share on other sites

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.