What causes the error message "Request payer account number does not match session" to appear when utilizing the PayPal smart button with multiple recipients?

Can I use login information or smart buttons to pay multiple payees?

I attempted the following:

paypal.Buttons({
        createOrder: function(data, actions) {
          return actions.order.create({
            purchase_units: [{
              reference_id: 'reference1',
              amount: {
                value: 1,
                currency: 'USD',
                breakdown: {
                  item_total: {
                    currency_code: 'USD',
                    value: 1
                  }
                }
              },
              description: 'description',
              payee: {
                email_address: 'payee1@example.com'
              },
              items: [{
                name: 'item1',
                unit_amount: {
                  currency_code: 'USD',
                  value: 1
                },
                quantity: 1
              }]
            },
            {
              reference_id: 'referenceid1',
              amount: {
                value: 1,
                currency: 'USD',
                breakdown: {
                  item_total: {
                    currency_code: 'USD',
                    value: 1
                  }
                }
              },
              description: 'The payment transaction description.',
              payee: {
                email_address: 'payee2@example.com'
              },
              items: [{
                name: 'item2',
                unit_amount: {
                  currency_code: 'USD',
                  value: 1
                },
                quantity: 1
              }]
            }]
          })
        },
        onApprove: function(data, actions) {
          return actions.order.capture().then(function(details) {
            alert('Transaction completed by ' + details.payer.name.given_name + '!')
          })
        }
      }).render('#paypal-button-container')

When trying to pay multiple payees, an error occurred:

{
description: "Mismatch between request payer account number and session"
field: "/purchase_units/@reference_id==reference1"
issue: "PAYER_INVALID_FOR_PAYMENT"
}

Paying with a single purchase unit works correctly.

Answer №1

It is not feasible, as only one purchase_unit can receive approval in the Checkout process

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the method for displaying html files in a POST request?

This is the code snippet I am working with: app.post('/convert', function(req,res){ var auxiliar = "somo Ubuntu command line(this works)"; exec(auxiliar, function(err, stdout, stderr){ if(err){ console.log ...

Utilizing vuex for Apollo pagination

Trying to incorporate vuetify's pagination component with the nuxtjs@apollo module has been quite a challenge for me. I'm facing difficulties making it work seamlessly with my vuex store. To avoid overwhelming you, I'll skim through most o ...

Getting a JWT token from Express to Angular using ngResource: A step-by-step guide

Currently, I am utilizing a jwt token for user registration validation. A unique URL is generated and sent to the user via email, which leads them to the authentication page. On the server side, the token is decoded and I need to transmit this JSON data to ...

Logging in securely without granting permissions using OAuth 2

I am brand new to working with OAuth and have a question about the workflow. I am currently using node/express/passport and have managed to configure the app to redirect properly when accessing my /auth/google endpoint. However, every time I attempt to lo ...

The presence of v-if does not depend on the model value to toggle the element

I have a scenario where I want to hide the dropdown menu for US states if a different country other than the US is selected. The code snippet I am using to achieve this functionality is shown below: <b-row v-for="demo in demographics" :key=&qu ...

Issue with React state not updating as per expectation, values in body are not being identified by backend system

I am currently facing a puzzling situation with a component in my React application. This component conditionally sets values based on state and button clicks, then sends the data object to RTK Query and ultimately to a controller in mongoose/express. Two ...

In production, Express-Session fails to persist

My nodejs application is encountering issues with express-session when running on gcloud production, although it works perfectly in my local development environment. app.js var express = require('express'); var path = require('path') ...

Having issues with v-for in Vuejs? It seems to be looping multiple times

<div v-for="item in items" :key="item.id"> <div v-for="accordion in accordions" :key="accordion.title" class="line" :class="{ green: accordion.text === 'AllaboutVue', red: accordi ...

Why does my computed property become undefined during unit testing of a head() method in Vue.js with Nuxt.js?

In my Vue.js + Nuxt.js component, I have implemented a head() method: <script> export default { name: 'my-page', head() { return { title: `${this.currentPage}` }; }, ... } </script> ...

What is the best way to integrate Vue CDN with Laravel?

I have integrated a Vue CDN link into my welcome.blade.php file. In the welcome blade, I included a script and defined Vue instances in app.js like this: require('./bootstrap'); import Vue from 'vue'; let app = new Vue({ el:'#a ...

Is it possible to horizontally scale socket connections using a combination of node.js, socket.io, and redis in an

I am diving into the world of node.js for the first time and seeking some guidance: Here are the programs I have installed on my server: node.js v0.11.3-pre express v3.3.4 socket.io v0.9.14 connect-redis v1.4.5 Redis server v=2.6.14 redis-cli 2.6.14 To ...

Having Trouble with Bcrypt Saving Your Password?

Having trouble with saving a new password to the database when hashing it? I am utilizing MongoDB, NodeJS, and Passport for allowing users to change their passwords. UserSchema.pre('save', function(next) { var user = this; var SALT_FACTOR = ...

Error: JSON at position 1 is throwing off the syntax in EXPRESS due to an unexpected token "

I'm currently utilizing a REST web service within Express and I am looking to retrieve an object that includes the specified hours. var express = require('express'); var router = express.Router(); /* GET home page. ...

What could be causing transition to not be recognized as an element in HTML?

<template> <header> <nav class="container"> <div class="branding"> <router-link class="header" :to="{name : 'Home'}">>FireBlogs</router-link> </div& ...

Vue.JS enables the seamless addition of rows to a form on the fly

I am currently working on creating a dynamic form using Vue. The concept is that when the user clicks the add button, another row will appear for them to input data. However, I encountered an issue where initially only 1 row was set up, but when I added th ...

The image has been restricted from view due to CORS specifically on Windows operating systems

This Vue component includes a photo block and an "edit" button. <template> <div> <tui-image-editor ref="editor" > </tui-image-editor> <div class=""> <img :src="img&qu ...

How to determine the best location to store images submitted through a POST request and the process for retrieving and transmitting the

Despite the commonality of my issue, I have not been able to find a specific solution due to the various use cases involved. Here is the concept: Users will be uploading images from the front-end, and each upload should generate a JSON entry in the datab ...

Unable to connect to Magento 2.3.6 REST APIs from localhost due to CORS policy restriction

Encountered CORS Policy Error While Trying to Access Magento REST APIs from Localhost I initially used the code snippets generated by "postman generate code snippets" in Postman, which worked fine. However, when I tried using Axios and other types of AJAX ...

Issues with Vue router lazy loading causing the failure to generate individual chunk files

I've been attempting to incorporate lazy loading into my routes, but I'm encountering some difficulties. Here's a snippet of how my index.js files in the router folder are set up: import Vue from "vue"; import VueRouter from "vue-router"; i ...

What is the best way to use PM2 for deploying my node.js application to various environments and ports within a single server?

I am facing an issue with deploying my node app using the ecosystem.json file and PM2. Despite trying various configurations, I have been unable to achieve my desired goal: To deploy the app in either a production or staging environment (both currently ...