How to use the paypal-checkout.rest function in paypal-checkout

To help you get started, we’ve selected a few paypal-checkout examples, based on popular ways it is used in public projects.

github khoanguyen96 / vue-paypal-checkout / src / components / PayPalCheckout.vue View on Github external
currency: this.currency,
          details: this.details,
        },
      }, assignTo(vue, propTypes.TRANSACTION));

      // TODO: clean this up
      if (transaction.shipping_address && transaction.item_list) {
        transaction.item_list.shipping_address = transaction.shipping_address;
        delete transaction.shipping_address;
      }

      const payment = {
        transactions: [transaction],
      };

      return paypal.rest.payment.create(
        this.env,
        this.client,
        Object.assign({ payment }, assignTo(vue, propTypes.PAYMENT)),
      );
    },
    onAuthorize(data, actions) {
github khoanguyen96 / vue-paypal-checkout / dist / vue-paypal-checkout.esm.js View on Github external
currency: this.currency,
          details: this.details
        }
      }, assignTo(vue, propTypes.TRANSACTION));

      // TODO: clean this up
      if (transaction.shipping_address && transaction.item_list) {
        transaction.item_list.shipping_address = transaction.shipping_address;
        delete transaction.shipping_address;
      }

      var payment = {
        transactions: [transaction]
      };

      return paypal.rest.payment.create(this.env, this.client, _Object$assign({ payment: payment }, assignTo(vue, propTypes.PAYMENT)));
    },
    onAuthorize: function onAuthorize(data, actions) {

paypal-checkout

PayPal Checkout components, for integrating checkout products.

Apache-2.0
Latest version published 5 months ago

Package Health Score

86 / 100
Full package analysis