Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dominos

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dominos - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "dominos",
"payment=disallowed-name": "pizzapi",
"version": "1.0.0",
"version": "1.0.1",
"description": "node js API for Domino's pizza",

@@ -6,0 +6,0 @@ "main": "dominos-pizza-api.js",

@@ -447,4 +447,12 @@ Domino's PizzAPI

var cardNumber='4100123422343234';
var cardInfo = new order.PaymentObject();
cardInfo.Amount = order.Amounts.Customer;
cardInfo.Number = cardNumber;
cardInfo.CardType = order.validateCC(cardNumber);
cardInfo.Expiration = '0115';// 01/15 just the numbers "01/15".replace(/\D/g,'');
cardInfo.SecurityCode = '777';
cardInfo.PostalCode = '90210'; // Billing Zipcode
order.Payments.push(cardInfo);

@@ -451,0 +459,0 @@

@@ -182,2 +182,38 @@ 'use strict';

Order.prototype.validateCC=function(number){
var re = {
visa : /^4[0-9]{12}(?:[0-9]{3})?$/,
mastercard : /^5[1-5][0-9]{14}$/,
amex : /^3[47][0-9]{13}$/,
diners : /^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,
discover : /^6(?:011|5[0-9]{2})[0-9]{12}$/,
jcb : /^(?:2131|1800|35\d{3})\d{11}$/,
enroute : /^(?:2014|2149)\d{11}$/
};
if (re.visa.test(number))
return 'VISA';
if (re.mastercard.test(number))
return 'MASTERCARD';
if (re.amex.test(number))
return 'AMEX';
if (re.diners.test(number))
return 'DINERS';
if (re.discover.test(number))
return 'DISCOVER';
if (re.jcb.test(number))
return 'JCB';
if (re.enroute.test(number))
return 'JCB';
return "";
}
}
Order.prototype.PaymentObject=function(){

@@ -184,0 +220,0 @@ Object.defineProperties(

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc