Return data for Direct Payment with PayPal Payments Advanced: Understanding the process

I currently have PayPal Payments Advanced set up with hosted checkout pages. On the initial page of the paylinkpro.paypal.com site, users are presented with two options:

Everything functions properly when a user chooses "Checkout w/ PayPal." However, I am encountering an issue when a user enters their credit card information in the second box labeled "Pay with credit or debit card." I am trying to understand what occurs when a user clicks the "Pay Now" button after entering all of their card details. My assumption is that they will be directed to an endpoint specified in manager.paypal.com, similar to the one set for the "Checkout w/ PayPal" button. Nevertheless, I am uncertain about the format of the data sent back to my server.

Could someone share an example of this output? How does it differ from the response received when a user opts to pay via PayPal instead? Understanding these distinctions is crucial as it appears that the "Pay Now" button triggers a distinct response, leading to a server error on my end (specifically a 5XX status code).

For your information, I am utilizing PHP on the server side.

Answer №1

It would be beneficial to conduct a test on your end to gain a better understanding of the variables that are passed in both scenarios. The parameters generally remain consistent, with only a few exceptions. Below are the variables from my testing for different types of payment methods received at my return URL:

For credit card payments :

AVSZIP=Y
TYPE=S
STATE=VA
ZIPTOSHIP=23455
ACCT=9988
PROCCVV2=M
PPREF=9K626765P4119092S
EMAIL=tsoasasa4%40gmail.com
ADDRESSTOSHIP=2323+Richardson+Rd
METHOD=CC
SHIPTOCOUNTRY=US
TRANSTIME=2014-10-08%2017:05:54
INVOICE=rdassC-sAADS-q3aa98sa6a
IAVS=N
STATETOSHIP=VA
BILLTOZIP=23455
SHIPTOSTATE=VA
BILLTOCITY=Virginia+Beach
TAX=0.72
CARDTYPE=0
AVSDATA=YYY
CITYTOSHIP=Virginia+Beach
PROCAVS=X
SECURETOKEN=9nFUJSuaWQk2bwnWhl1iYvQM2
INVNUM=rdassC-sAADS-q3aa98sa6a
CITY=Virginia+Beach
BILLTOSTREET=3947+Richardson+Rd
RESULT=0
TRXTYPE=S
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="35777c7979617a7078747c790841465a4654465401755258545c591b565a58">[email protected]</a>
BILLTOLASTNAME=Tsosie
BILLTONAME=Rolaasand%20Tsosie
SHIPTOCITY=Virginia+Beach
CVV2MATCH=Y
LASTNAME=Tssaosie
PNREF=B70P6F3BC67D
TENDER=CC
PHONE=757-262-8051
SHIPTOZIP=23455
BILLTOFIRSTNAME=Roland
AMT=12.72
CORRELATIONID=89e0742fc9da4
NAMETOSHIP=Roland+Tsosie
ZIP=23455
BILLTOCOUNTRY=US
AUTHCODE=111111
EXPDATE=0119
RESPMSG=Approved
COUNTRY=US
SHIPTOSTREET=3947+Richardson+Rd
BILLTOSTATE=VA
FIRSTNAME=Roland
SECURETOKENID=wswqasxxg7azasajsa98988la531f4x31ec3
AVSADDR=Y
BILLTOPHONE=757-262-8051
NAME=Roland+Tsosie
COUNTRYTOSHIP=US
ADDRESS=3947+Richardson+Rd

For PayPal Payments :

AVSZIP=Y
STATE=VA
TYPE=S
ZIPTOSHIP=23455
PPREF=0F868584E70198612
PAYERID=4E3LKXST3TKCY
EMAIL=Eshan%40personal.com
ADDRESSTOSHIP=2131+Richardson+Rd
METHOD=P
SHIPTOCOUNTRY=US
TRANSTIME=2014-10-08%2017:09:25
INVOICE=rdassC-sAADS-q3aa98sa6asaa
STATETOSHIP=VA
TOKEN=EC-5C851027CE4200400
BILLTOZIP=23455
SHIPTOSTATE=VA
BILLTOCITY=Virginia+Beach
TAX=0.72
PAYMENTTYPE=instant
AVSDATA=YYY
CITYTOSHIP=Virginia+Beach
SECURETOKEN=8vhYqum1qRkOHaJmZ8TGU5wgw
INVNUM=rdassC-sAADS-q3aa98sa6asaa
CITY=Virginia+Beach
BILLTOSTREET=3947+Richardson+Rd
RESULT=0
TRXTYPE=S
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b7f5fefbfbe3f8f2faf6fefb8af2c4d9f7c7c4d9d6db99d4d8da">[email protected]</a>
BILLTOLASTNAME=Account
BILLTONAME=Roland%20Tsosie
SHIPTOCITY=Virginia+Beach
LASTNAME=Tsosie
TENDER=P
PNREF=B1PP7AF2E280
PHONE=757-262-8051
SHIPTOZIP=23455
BILLTOFIRSTNAME=Eshan%20Personal%20Test
AMT=12.72
CORRELATIONID=95a351e2471dd
PENDINGREASON=completed
NAMETOSHIP=Eshan+Personal+Test+Account
FEEAMT=0.67
ZIP=23455
BILLTOCOUNTRY=US
TAXAMT=0.72
RESPMSG=Approved
COUNTRY=US
SHIPTOSTREET=3947+Richardson+Rd
BILLTOSTATE=VA
FIRSTNAME=Roland
SECURETOKENID=wswqasxxg7azasajasasa98988la531f4x31
AVSADDR=Y
BILLTOPHONE=757-262-8051
NAME=Roland+Tsosie
COUNTRYTOSHIP=US
ADDRESS=2121+Richardson+Rd

Upon completion, you will be directed to the return URL specified in the manager account. If a return URL is included in the code, it will take precedence over the default.

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

Error Encountered: Attempting to invoke a method on a variable that is not an

function finishGame($outcome) { $query = "UPDATE stats SET outcome = ? WHERE id = ?"; $statement = $this->connection->prepare($query); $statement->bind_param("si", $outcome, $this->currentSession);//Issue here $statement-& ...

Personalized styling of PHP exception including gathered information

When working with PHP Exception sub classes, I often encounter scenarios where I need to gather data and then compile it into a final error message. For instance: One use case involves checking for contiguous days in the data. $missing = new MissingAdj ...

tips for uploading image data using JavaScript

My HTML form sends POST data to my PHP script and uses AJAX for a live preview The issue arises with the image input field in the form Here's an example of the form structure: <form method="post" action="scripts/test.php" enctype="multipart/form ...

Utilizing the chain method in the PDO class

This is a "wrapper" class that utilizes PDO (although it is quite extensive, the important segment is highlighted here) class DB { protected $pdo; protected $dsn; protected $username; protected $password; protec ...

What is the quickest way to redirect a URL in WordPress?

Is it possible to redirect a URL instantly in WordPress using this script code? JavaScript Code: jQuery(document).ready(function() { var x = window.location.href; if (x == 'http://example.com/') { window.location.hr ...

Incorporating Bootstrap Content: A Guide to Including a PHP File within Another PHP File

I am encountering an issue when trying to import a PHP file containing my navigation bar into another PHP file. Here's the code for the navigation file: <?php echo " <html> <head> <nav class = "navbar navbar-default navbar-fixed-top ...

Automatically redirecting to the designated page once the radio button option is submitted

I am encountering an issue with my form. I require it to redirect the user to different pages based on the selection of a radio button. The user must choose one of two options and click "next," and depending on their choice, they should be redirected to an ...

Pass a PHP string to C++

I have a question about passing a string from PHP to C++. I've been able to pass numbers successfully, but I'm running into issues with passing letters. Here's the PHP code that works: <?php $r = 5; $s = 12; $x = 3; $y = 4; $q = "Hell ...

Looking to eliminate the usage of hostname, username, and password in PHP code

Here is some PHP code I need help with: <?php /* $host='127.0.0.1'; $uname='root'; $pwd='password'; $db="android"; */ require_once('dbConnect.php'); /* $con = mysql_connect($host,$uname,$pwd) or die("connect ...

Converting an array to a WHERE clause in PHP and MySQL

Change this array array("user_id"=>"8", "product_id"=>"35", "quantity"=>"1") into a query select * from tbl_name where user_id='8' and product_id='35' and quantity='1' Additionally, how can one utilize the codeign ...

Android Volley library fails to process PHP POST request

In my Android app, I used Volley to make a POST request with the following code snippet. JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Method.POST, ServerURL.URL_REGISTER, new Response.Listener<JSONObject>() { @Override public ...

Real-time chat functionality using Laravel 5.2, socket.io, and private messaging with redis

TLDR; Seeking best solution for private instant messenger integration with Laravel. I currently have a live real-time chat feature on my Laravel website, but I am missing the ability for private messaging. The chat is located on the home page and every ti ...

Transferring an Array from PHP to Javascript

I'm attempting to pass a PHP array so that I can use it in JavaScript. The PHP code I have written is shown below: <?php $link = mysqli_connect("localhost", "root", "password", "database"); /* check connection */ if (mysqli_connect_errn ...

Navigate through the JSON dataset

I am struggling with looping out JSON-data in an HTML list using PHP. The structure of the JSON data is as follows: { "msg": [ "msg text 1", "msg text 2", "msg text 3", "msg text 4", "msg text 5", "msg text 6" ] } My current P ...

How to access the calling scope within a PHP function?

Is it possible to access the scope of the calling environment from within a called function? For instance, how can I retrieve __LINE__ in a logging function but ensure it reflects the actual line number from the calling context? Additionally, is there a w ...

php dividing a string

Greetings, I have a question that may seem novice, but I am eager to find the answer. Back when my programming language was VB6, I used the Split method just like in PHP. However, there seems to be a key difference. When I run the following code: $page_ar ...

Symfony2 Query Builder for selecting data where the total quantity of children is greater than zero

In my quest to gather a result set of orders with associated children (OrderPayments), I am specifically looking for orders where the total sum of OrderPayments exceeds zero. Despite my efforts, I have encountered an issue while executing the code. The er ...

Easy PHP navigation options

Creating a basic PHP page with includes is proving challenging when it comes to navigating URLs using '../' to find the correct path to the folder. Is there a straightforward way to set up a simple PHP navigation without involving MySQL or other ...

Steps to supplying the private key when using the openssl_private_decrypt() function

I have encrypted a value using my public key but I am unable to decrypt it with my private key. Is there something wrong with my code? Here is the script that I am using: <?php $encrypted = "Q4tmeBDTS+M2UriF6zNBJYrWcXJuyclWVAFLZaOSNwTS0FOkqd/7yQ9KrwL ...

PHP Login and Cookies functionality specifically designed for the homepage

I started learning PHP just a week ago, but now I'm facing an issue. My PHP login and session script only work on the front page. When I test it by clearing cookies and typing in the browser to a specific page on my site (for example: www.mysite.com/p ...