Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPayPalTransaction missing fields #17

Closed
nodehack opened this issue Sep 13, 2018 · 2 comments
Closed

IPayPalTransaction missing fields #17

nodehack opened this issue Sep 13, 2018 · 2 comments
Assignees

Comments

@nodehack
Copy link

I'm not sure of the comprehensive list but from paypals documentation there are a lot of missing fields in the IPayPalTransaction type.

// Set up a payment
payment: function(data, actions) {
  return actions.payment.create({
    transactions: [{
      amount: {
        total: '30.11',
        currency: 'USD',
        details: {
          subtotal: '30.00',
          tax: '0.07',
          shipping: '0.03',
          handling_fee: '1.00',
          shipping_discount: '-1.00',
          insurance: '0.01'
        }
      },
      description: 'The payment transaction description.',
      custom: '90048630024435',
      //invoice_number: '12345', Insert a unique invoice number
      payment_options: {
        allowed_payment_method: 'INSTANT_FUNDING_SOURCE'
      },
      soft_descriptor: 'ECHI5786786',
      item_list: {
        items: [
        {
          name: 'hat',
          description: 'Brown hat.',
          quantity: '5',
          price: '3',
          tax: '0.01',
          sku: '1',
          currency: 'USD'
        },
        {
          name: 'handbag',
          description: 'Black handbag.',
          quantity: '1',
          price: '15',
          tax: '0.02',
          sku: 'product34',
          currency: 'USD'
        }],
        shipping_address: {
          recipient_name: 'Brian Robinson',
          line1: '4th Floor',
          line2: 'Unit #34',
          city: 'San Jose',
          country_code: 'US',
          postal_code: '95131',
          phone: '011862212345678',
          state: 'CA'
        }
      }
    }],
    note_to_payer: 'Contact us for any questions on your order.'
  });
},

https://developer.paypal.com/docs/checkout/integrate/#2-set-up-a-payment

These fields should be exposed on the IPayPalTransaction type.

@Enngage
Copy link
Owner

Enngage commented Sep 14, 2018

I'll take a closer look at these.. I wish there was better documentation on these properties by PayPal as I don't even remember seeing this example when I was initially making this library.

@Enngage Enngage self-assigned this Sep 14, 2018
@Enngage
Copy link
Owner

Enngage commented Sep 14, 2018

I added more properties (3.2.0 release). Let me know if something missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants