I am working on apple payMagento 2 Add new field to Magento_User admin formAmazon pay magento 2.2.4Magento 2 - Amazon Pay ErrorAmazon pay not workingCheckout not working after remove Apple PayMagento2 : Apple Pay Integration With Payfort PaymentApple Pay Payfort Magento2Apple Pay with magentoApple Pay sheet not showing in magento2How pass apple payload to payfort in magento2

Convergenge or divergence of series with e

Most elegant way to write a one shot IF

Is there reliable evidence that depleted uranium from the 1999 NATO bombing is causing cancer in Serbia?

Details of video memory access arbitration in Space Invaders

I'm reinstalling my Linux desktop, how do I keep SSH logins working?

Where can I get macOS Catalina Beta version?

How hard is it to sell a home which is currently mortgaged?

The Confused Alien

Golf the smallest circle!

How would an order of Monks that renounce their names communicate effectively?

In native German words, is Q always followed by U, as in English?

How can I reduce the sound of rain on a range hood vent?

Why did this meteor appear cyan?

Who gets an Apparition licence?

Skipping over failed imports until they are needed (if ever)

Does the Pi 4 resolve the Ethernet+USB bottleneck issue of past versions?

Why transcripts instead of degree certificates?

Do space suits measure "methane" levels or other biological gases?

Can a police officer film me on their personal device in my own home?

Could human civilization live 150 years in a nuclear-powered aircraft carrier colony without resorting to mass killing/ cannibalism?

Is this hogweed?

Why isn’t the tax system continuous rather than bracketed?

Why are 120 V general receptacle circuits limited to 20 A?

Symbol for "not absolutely continuous" in Latex



I am working on apple pay


Magento 2 Add new field to Magento_User admin formAmazon pay magento 2.2.4Magento 2 - Amazon Pay ErrorAmazon pay not workingCheckout not working after remove Apple PayMagento2 : Apple Pay Integration With Payfort PaymentApple Pay Payfort Magento2Apple Pay with magentoApple Pay sheet not showing in magento2How pass apple payload to payfort in magento2






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















i am working on apple pay i got payment sheet and finger print option successfully now when i put finger the processing spin and payment failed to complete this is my code



<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
</head>
<style>
#apple-pay-button

background-color: black;
background-image: -webkit-named-image(apple-pay-logo-white);
background-size: 100% 100%;
background-origin: content-box;
background-repeat: no-repeat;
width: 100%;
height: 44px;
padding: 10px 0;
border-radius: 10px;

</style>
<button id="apple-pay-button"></button>


<script type="text/javascript">
document.getElementById('apple-pay-button').addEventListener('click', beginApplePay);

function beginApplePay()
var base =
clientInstance: null,
applePayInstance: null,
/**
* Example:
*
* displayName: 'Apple Pay',
* onValidateMerchant: function() ,
* onShippingContactSelected: function(event, applePayInstance, session) ,
* onShippingMethodSelected: function(event, applePayInstance, session) ,
* onPaymentMethodSelected: function(event, applePayInstance, session) ,
* onPaymentAuthorized: function() payload, event,
*
*/
config:
clientToken: null,
payment:
currencyCode: 'USD',
supportedNetworks: ['amex', 'discover', 'masterCard', 'visa'],
merchantCapabilities: ['supports3DS'],
requiredShippingContactFields: ["postalAddress", "email", "phone"]


;
var paymentRequest =
"countryCode": "US",
"currencyCode": "USD",
"merchantCapabilities": [
"supports3DS"
],
"supportedNetworks": [
"visa",
"masterCard",
"amex",
"discover"
],
"total":
"label": "My Store (Card is not charged)",
"type": "final",
"amount": "1.99"

;


var session = new ApplePaySession(3, paymentRequest);


session.onvalidatemerchant = function (event)

var promise = performValidation(event.validationURL);
promise.then(function (merchantSession)
console.log(merchantSession);
session.completeMerchantValidation(merchantSession);
);

function performValidation(valURL)
return new Promise(function(resolve, reject)
var xhr = new XMLHttpRequest();
xhr.onload = function()
var data = JSON.parse(this.responseText);

resolve(data);
;
xhr.onerror = reject;
xhr.open('GET', 'startapplepaysession.php');
xhr.send();
);


session.onpaymentmethodselected = function(event)

console.log("test");
var newTotal = type: 'final', label: 'test', amount:"44" ;
var newLineItems =[type: 'final',label: "sdfsad", amount: "44" , type: 'final',label: 'P&P', amount: "45" ];

session.completePaymentMethodSelection( newTotal, newLineItems );



session.onpaymentauthorized = function (event)
console.log(event.payment.token);
//logit('starting session.onpaymentauthorized');
//logit('NB: This is the first stage when you get the *full shipping address* of the customer, in the event.payment.shippingContact object');
//logit(event);

var promise = sendPaymentToken(event.payment.token);
promise.then(function (success)
console.log(event.payment.token);
var status;
if (success)
status = ApplePaySession.STATUS_SUCCESS;
document.getElementById("applePay").style.display = "none";
document.getElementById("success").style.display = "block";
else
status = ApplePaySession.STATUS_FAILURE;


// logit( "result of sendPaymentToken() function = " + success );
session.completePayment(status);
);


function sendPaymentToken(paymentToken)
console.log(paymentToken);
return new Promise(function(resolve, reject)
// logit('starting function sendPaymentToken()');
// logit(paymentToken);

// logit("this is where you would pass the payment token to your third-party payment provider to use the token to charge the card. Only if your provider tells you the payment was successful should you return a resolve(true) here. Otherwise reject;");
//logit("defaulting to resolve(true) here, just to show what a successfully completed transaction flow looks like");
// if ( debug == true )
// resolve(true);
// else
// reject;
);


function logit( data )

if( debug == true )
console.log(data);


;
session.begin();



</script>









share|improve this question






























    0















    i am working on apple pay i got payment sheet and finger print option successfully now when i put finger the processing spin and payment failed to complete this is my code



    <head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
    </head>
    <style>
    #apple-pay-button

    background-color: black;
    background-image: -webkit-named-image(apple-pay-logo-white);
    background-size: 100% 100%;
    background-origin: content-box;
    background-repeat: no-repeat;
    width: 100%;
    height: 44px;
    padding: 10px 0;
    border-radius: 10px;

    </style>
    <button id="apple-pay-button"></button>


    <script type="text/javascript">
    document.getElementById('apple-pay-button').addEventListener('click', beginApplePay);

    function beginApplePay()
    var base =
    clientInstance: null,
    applePayInstance: null,
    /**
    * Example:
    *
    * displayName: 'Apple Pay',
    * onValidateMerchant: function() ,
    * onShippingContactSelected: function(event, applePayInstance, session) ,
    * onShippingMethodSelected: function(event, applePayInstance, session) ,
    * onPaymentMethodSelected: function(event, applePayInstance, session) ,
    * onPaymentAuthorized: function() payload, event,
    *
    */
    config:
    clientToken: null,
    payment:
    currencyCode: 'USD',
    supportedNetworks: ['amex', 'discover', 'masterCard', 'visa'],
    merchantCapabilities: ['supports3DS'],
    requiredShippingContactFields: ["postalAddress", "email", "phone"]


    ;
    var paymentRequest =
    "countryCode": "US",
    "currencyCode": "USD",
    "merchantCapabilities": [
    "supports3DS"
    ],
    "supportedNetworks": [
    "visa",
    "masterCard",
    "amex",
    "discover"
    ],
    "total":
    "label": "My Store (Card is not charged)",
    "type": "final",
    "amount": "1.99"

    ;


    var session = new ApplePaySession(3, paymentRequest);


    session.onvalidatemerchant = function (event)

    var promise = performValidation(event.validationURL);
    promise.then(function (merchantSession)
    console.log(merchantSession);
    session.completeMerchantValidation(merchantSession);
    );

    function performValidation(valURL)
    return new Promise(function(resolve, reject)
    var xhr = new XMLHttpRequest();
    xhr.onload = function()
    var data = JSON.parse(this.responseText);

    resolve(data);
    ;
    xhr.onerror = reject;
    xhr.open('GET', 'startapplepaysession.php');
    xhr.send();
    );


    session.onpaymentmethodselected = function(event)

    console.log("test");
    var newTotal = type: 'final', label: 'test', amount:"44" ;
    var newLineItems =[type: 'final',label: "sdfsad", amount: "44" , type: 'final',label: 'P&P', amount: "45" ];

    session.completePaymentMethodSelection( newTotal, newLineItems );



    session.onpaymentauthorized = function (event)
    console.log(event.payment.token);
    //logit('starting session.onpaymentauthorized');
    //logit('NB: This is the first stage when you get the *full shipping address* of the customer, in the event.payment.shippingContact object');
    //logit(event);

    var promise = sendPaymentToken(event.payment.token);
    promise.then(function (success)
    console.log(event.payment.token);
    var status;
    if (success)
    status = ApplePaySession.STATUS_SUCCESS;
    document.getElementById("applePay").style.display = "none";
    document.getElementById("success").style.display = "block";
    else
    status = ApplePaySession.STATUS_FAILURE;


    // logit( "result of sendPaymentToken() function = " + success );
    session.completePayment(status);
    );


    function sendPaymentToken(paymentToken)
    console.log(paymentToken);
    return new Promise(function(resolve, reject)
    // logit('starting function sendPaymentToken()');
    // logit(paymentToken);

    // logit("this is where you would pass the payment token to your third-party payment provider to use the token to charge the card. Only if your provider tells you the payment was successful should you return a resolve(true) here. Otherwise reject;");
    //logit("defaulting to resolve(true) here, just to show what a successfully completed transaction flow looks like");
    // if ( debug == true )
    // resolve(true);
    // else
    // reject;
    );


    function logit( data )

    if( debug == true )
    console.log(data);


    ;
    session.begin();



    </script>









    share|improve this question


























      0












      0








      0








      i am working on apple pay i got payment sheet and finger print option successfully now when i put finger the processing spin and payment failed to complete this is my code



      <head>
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
      </head>
      <style>
      #apple-pay-button

      background-color: black;
      background-image: -webkit-named-image(apple-pay-logo-white);
      background-size: 100% 100%;
      background-origin: content-box;
      background-repeat: no-repeat;
      width: 100%;
      height: 44px;
      padding: 10px 0;
      border-radius: 10px;

      </style>
      <button id="apple-pay-button"></button>


      <script type="text/javascript">
      document.getElementById('apple-pay-button').addEventListener('click', beginApplePay);

      function beginApplePay()
      var base =
      clientInstance: null,
      applePayInstance: null,
      /**
      * Example:
      *
      * displayName: 'Apple Pay',
      * onValidateMerchant: function() ,
      * onShippingContactSelected: function(event, applePayInstance, session) ,
      * onShippingMethodSelected: function(event, applePayInstance, session) ,
      * onPaymentMethodSelected: function(event, applePayInstance, session) ,
      * onPaymentAuthorized: function() payload, event,
      *
      */
      config:
      clientToken: null,
      payment:
      currencyCode: 'USD',
      supportedNetworks: ['amex', 'discover', 'masterCard', 'visa'],
      merchantCapabilities: ['supports3DS'],
      requiredShippingContactFields: ["postalAddress", "email", "phone"]


      ;
      var paymentRequest =
      "countryCode": "US",
      "currencyCode": "USD",
      "merchantCapabilities": [
      "supports3DS"
      ],
      "supportedNetworks": [
      "visa",
      "masterCard",
      "amex",
      "discover"
      ],
      "total":
      "label": "My Store (Card is not charged)",
      "type": "final",
      "amount": "1.99"

      ;


      var session = new ApplePaySession(3, paymentRequest);


      session.onvalidatemerchant = function (event)

      var promise = performValidation(event.validationURL);
      promise.then(function (merchantSession)
      console.log(merchantSession);
      session.completeMerchantValidation(merchantSession);
      );

      function performValidation(valURL)
      return new Promise(function(resolve, reject)
      var xhr = new XMLHttpRequest();
      xhr.onload = function()
      var data = JSON.parse(this.responseText);

      resolve(data);
      ;
      xhr.onerror = reject;
      xhr.open('GET', 'startapplepaysession.php');
      xhr.send();
      );


      session.onpaymentmethodselected = function(event)

      console.log("test");
      var newTotal = type: 'final', label: 'test', amount:"44" ;
      var newLineItems =[type: 'final',label: "sdfsad", amount: "44" , type: 'final',label: 'P&P', amount: "45" ];

      session.completePaymentMethodSelection( newTotal, newLineItems );



      session.onpaymentauthorized = function (event)
      console.log(event.payment.token);
      //logit('starting session.onpaymentauthorized');
      //logit('NB: This is the first stage when you get the *full shipping address* of the customer, in the event.payment.shippingContact object');
      //logit(event);

      var promise = sendPaymentToken(event.payment.token);
      promise.then(function (success)
      console.log(event.payment.token);
      var status;
      if (success)
      status = ApplePaySession.STATUS_SUCCESS;
      document.getElementById("applePay").style.display = "none";
      document.getElementById("success").style.display = "block";
      else
      status = ApplePaySession.STATUS_FAILURE;


      // logit( "result of sendPaymentToken() function = " + success );
      session.completePayment(status);
      );


      function sendPaymentToken(paymentToken)
      console.log(paymentToken);
      return new Promise(function(resolve, reject)
      // logit('starting function sendPaymentToken()');
      // logit(paymentToken);

      // logit("this is where you would pass the payment token to your third-party payment provider to use the token to charge the card. Only if your provider tells you the payment was successful should you return a resolve(true) here. Otherwise reject;");
      //logit("defaulting to resolve(true) here, just to show what a successfully completed transaction flow looks like");
      // if ( debug == true )
      // resolve(true);
      // else
      // reject;
      );


      function logit( data )

      if( debug == true )
      console.log(data);


      ;
      session.begin();



      </script>









      share|improve this question
















      i am working on apple pay i got payment sheet and finger print option successfully now when i put finger the processing spin and payment failed to complete this is my code



      <head>
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
      </head>
      <style>
      #apple-pay-button

      background-color: black;
      background-image: -webkit-named-image(apple-pay-logo-white);
      background-size: 100% 100%;
      background-origin: content-box;
      background-repeat: no-repeat;
      width: 100%;
      height: 44px;
      padding: 10px 0;
      border-radius: 10px;

      </style>
      <button id="apple-pay-button"></button>


      <script type="text/javascript">
      document.getElementById('apple-pay-button').addEventListener('click', beginApplePay);

      function beginApplePay()
      var base =
      clientInstance: null,
      applePayInstance: null,
      /**
      * Example:
      *
      * displayName: 'Apple Pay',
      * onValidateMerchant: function() ,
      * onShippingContactSelected: function(event, applePayInstance, session) ,
      * onShippingMethodSelected: function(event, applePayInstance, session) ,
      * onPaymentMethodSelected: function(event, applePayInstance, session) ,
      * onPaymentAuthorized: function() payload, event,
      *
      */
      config:
      clientToken: null,
      payment:
      currencyCode: 'USD',
      supportedNetworks: ['amex', 'discover', 'masterCard', 'visa'],
      merchantCapabilities: ['supports3DS'],
      requiredShippingContactFields: ["postalAddress", "email", "phone"]


      ;
      var paymentRequest =
      "countryCode": "US",
      "currencyCode": "USD",
      "merchantCapabilities": [
      "supports3DS"
      ],
      "supportedNetworks": [
      "visa",
      "masterCard",
      "amex",
      "discover"
      ],
      "total":
      "label": "My Store (Card is not charged)",
      "type": "final",
      "amount": "1.99"

      ;


      var session = new ApplePaySession(3, paymentRequest);


      session.onvalidatemerchant = function (event)

      var promise = performValidation(event.validationURL);
      promise.then(function (merchantSession)
      console.log(merchantSession);
      session.completeMerchantValidation(merchantSession);
      );

      function performValidation(valURL)
      return new Promise(function(resolve, reject)
      var xhr = new XMLHttpRequest();
      xhr.onload = function()
      var data = JSON.parse(this.responseText);

      resolve(data);
      ;
      xhr.onerror = reject;
      xhr.open('GET', 'startapplepaysession.php');
      xhr.send();
      );


      session.onpaymentmethodselected = function(event)

      console.log("test");
      var newTotal = type: 'final', label: 'test', amount:"44" ;
      var newLineItems =[type: 'final',label: "sdfsad", amount: "44" , type: 'final',label: 'P&P', amount: "45" ];

      session.completePaymentMethodSelection( newTotal, newLineItems );



      session.onpaymentauthorized = function (event)
      console.log(event.payment.token);
      //logit('starting session.onpaymentauthorized');
      //logit('NB: This is the first stage when you get the *full shipping address* of the customer, in the event.payment.shippingContact object');
      //logit(event);

      var promise = sendPaymentToken(event.payment.token);
      promise.then(function (success)
      console.log(event.payment.token);
      var status;
      if (success)
      status = ApplePaySession.STATUS_SUCCESS;
      document.getElementById("applePay").style.display = "none";
      document.getElementById("success").style.display = "block";
      else
      status = ApplePaySession.STATUS_FAILURE;


      // logit( "result of sendPaymentToken() function = " + success );
      session.completePayment(status);
      );


      function sendPaymentToken(paymentToken)
      console.log(paymentToken);
      return new Promise(function(resolve, reject)
      // logit('starting function sendPaymentToken()');
      // logit(paymentToken);

      // logit("this is where you would pass the payment token to your third-party payment provider to use the token to charge the card. Only if your provider tells you the payment was successful should you return a resolve(true) here. Otherwise reject;");
      //logit("defaulting to resolve(true) here, just to show what a successfully completed transaction flow looks like");
      // if ( debug == true )
      // resolve(true);
      // else
      // reject;
      );


      function logit( data )

      if( debug == true )
      console.log(data);


      ;
      session.begin();



      </script>






      magento2






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 18 at 14:21









      Rk Rathod

      2,4163 silver badges17 bronze badges




      2,4163 silver badges17 bronze badges










      asked Jun 18 at 14:01









      werwerwerwer

      947 bronze badges




      947 bronze badges




















          0






          active

          oldest

          votes














          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "479"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f278760%2fi-am-working-on-apple-pay%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f278760%2fi-am-working-on-apple-pay%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

          Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

          Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?