Skip to content

Instantly share code, notes, and snippets.

@JDillon522
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JDillon522/baa79eb1a4e47b06be60 to your computer and use it in GitHub Desktop.
Save JDillon522/baa79eb1a4e47b06be60 to your computer and use it in GitHub Desktop.
ember-cli-paypal schema
// Submit Credit Card Payment
// Method: POST
// url: v1/payments/payment
var schemea = {
"intent": "sale",
"payer": {
"payment_method": "credit_card",
"funding_instruments": [
{
"credit_card": {
"id": "string",
"payer_id": "string",
"number": "string",
"type": "string",
"expire_month": "integer",
"expire_year": "integer",
"cvv2": "string",
"first_name": "string",
"last_name": "string",
"billing_address": {},
"external_customer_id": "string",
"merchant_id": "string",
"external_card_id": "string",
"create_time": "date-time",
"update_time": "date-time",
"state": "string",
"valid_until": "string"
},
"credit_card_token": {
"credit_card_id": "string",
"payer_id": "string",
"last4": "string",
"expire_year": "integer",
"expire_month": "integer"
}
}
],
"payer_info": {
"email": "string",
"salutation": "string",
"first_name": "string",
"middle_name": "string",
"last_name": "string",
"suffix": "string",
"payer_id": "string",
"phone": "string",
"country_code": "string",
"shipping_address": {
"recipient_name": "string",
"type": "string",
"line1": "string",
"line2": "string",
"city": "string",
"country_code": "string",
"postal_code": "string",
"state": "string",
"phone": "string"
},
"tax_id_type": "string",
"tax_id": "string"
},
"status": "string"
},
"transactions": {
"amount": {
"currency": "string",
"total": "string",
"details": {
"shipping": "string",
"subtotal": "string",
"tax": "string",
"handling_fee": "string",
"insurance": "string",
"shipping_discount": "string"
}
},
"description": "string",
"item_list": [
{
"items": [
{
"quantity": "string",
"name": "string",
"price": "string",
"currency": "string",
"sku": "string",
"description": "string",
"tax": "string"
}
],
"shipping_address": {
"recipient_name": "string",
"type": "string",
"line1": "string",
"line2": "string",
"city": "string",
"country_code": "string",
"postal_code": "string",
"state": "string",
"phone": "string"
}
}
],
"related_resources": "array of sale",
"invoice_number": "string",
"custom": "string",
"soft_descriptor": "string",
"payment_options": {
"allowed_payment_method": "string"
}
},
"redirect_urls": {
"return_url": "string",
"cancel_url": "string"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment