Paypal Plus - How to get a user selected payment method (decrypted)

In my form, I implemented Paywall PayPal Plus, which is described here: https://www.paypalobjects.com/webstatic/de_DE/downloads/PayPal-PLUS-IntegrationGuide.pdf .

Everything is working fine so far, but after choosing payment, I want to show users a summary of orders on the next page and you need a payment method chosen by the user, which is stored in encrypted form in the paypalplus_session_v2 cookie.

I can also call getPaymentMethod (), which will return the same encrypted string as this:

paymentMethod "pp-82c59049fcdc48ec960990a83b100cb7"

So, how to get a clear text payment method?

Here are some JS codes for a better explanation:

     var ppp = PAYPAL.apps.PPP({
         "approvalUrl": appUrl,
         "placeholder": "ppplus",
         "mode": "sandbox",
         "country": "DE",
         "language": "de_DE",
         "showPuiOnSandbox": "true",
          buttonLocation: "outside",
          enableContinue: "continueButton",
         "showLoadingIndicator": true,
          onContinue: function () {
                  window.location = "nextpage.php";
          },
});

console.log(ppp.getPaymentMethod()); 

... paymentMethod "pp-82c59049fcdc48ec960990a83b100cb7"

+4
1

EDITED

PPPLUS Js cookie, , paymentmethod, ,

INTERNAL-LOG: saveInCookie data from cookie:    
{
  "mode": "sandbox",
  "useraction": "continue",
  "language": "en_US",
  "country": "DE",
  "ecToken": "EC-0KL610776H817283B",
  "thirdPartyMethods": {},
  "paymentMethod": "pp-ca7aac1ecc8fb208ad8b0e3020fc290a"
}

, paymentmethod , DOM iframe, data-pm paymentmethod (PayPal, Bank, Credit_Card) .

iframe :

<div class="paymentMethodRow row "id="pp&#x2D;f029166c6c171d6ea4b98d60814e7206" data-pm="PayPal">

<div class="paymentMethodRow row selected"id="pp&#x2D;ca7aac1ecc8fb208ad8b0e3020fc290a" data-pm="Bank">

<div class="paymentMethodRow row "id="pp&#x2D;d5fc25f73191ac7ea7399fc5d43b802d" data-pm="Credit_Card">
+4

All Articles