【问题标题】:Paypal checkout can you auto expand the cartPaypal 结帐可以自动展开购物车吗
【发布时间】:2021-03-09 17:25:25
【问题描述】:

当用户单击我网站上的使用 Paypal 付款按钮时,结帐弹出窗口出现,除了总数之外没有其他信息。如果您单击顶部的购物车,那么您会看到交易的详细信息。许多用户不知道点击购物车。有没有办法默认显示此信息?

我在沙盒模式下使用 JavaScript SDK

示例代码:

  paypal.Buttons({
  style: {
    shape: 'rect',
    color: 'gold',
    layout: 'vertical',
    label: 'pay',
    
  },
 createOrder: function(data, actions) {
  // This function sets up the details of the transaction, including the amount and line item details.
    
var orderDescription = "TEST "
  return actions.order.create({
    intent: "CAPTURE",
      
    
    purchase_units: [{
         amount: {
                currency_code: "CAD",
                value: "150.00",
                breakdown: {
                    item_total: {
                        currency_code: "CAD",
                        value: "150.00"
                    }
                }
            },
            items: [
                {
                    name: "Computer",
                    description: "The best item ever",
                    sku: "xyz-2654",
                    unit_amount: {
                        currency_code: "CAD",
                        value: "50.00"
                    },
                    quantity: "3"
                },
               
            ]

        }],
    payee: {
         email_address: "payee@gmail.com"
        
       },
    payee_display_metadata: {
        brand_name: "name"
    },
    
     application_context: {
                shipping_preference: "NO_SHIPPING",
                business_name:"name",
          "brand_name": "Name",  // SHOWS ONLY on CANCEL AND RETURN TO brand_name
     },
     note_to_payer: "Contact us for any questions on your order.",
    

    
    
  });

【问题讨论】:

    标签: javascript paypal


    【解决方案1】:

    不,默认没有办法展开。

    专注于设计您网站的页面,以便在用户点击打开付款批准窗口之前,清楚地显示有关内容和总数的信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-13
      • 1970-01-01
      • 2020-04-23
      • 2020-07-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多