GithubHelp home page GithubHelp logo

isabella232 / credit-offers-wordpress-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from capitalone/credit-offers-wordpress-plugin

0.0 0.0 0.0 21 KB

License: Apache License 2.0

PHP 94.85% CSS 1.99% JavaScript 3.16%

credit-offers-wordpress-plugin's Introduction

Credit Offers Wordpress Plugin

Point & click configuration of Credit Offers API for Wordpress

Setup

  • Download release and install as plugin in Wordpress.
  • Set Client Id & Client Secret
  • Set path for generated configuration file to live (should be outside web root)
  • Set password for generated PKCS#12 keystore

Usage

Retrieve Product Listings

if ( method_exists('Wp_Creditoffers', 'get_product_listings' ) ) {
  // Get listings from API or cache
  $product_listings = Wp_Creditoffers::get_product_listings();

  // Get products
  $products = $product_listings->products;

  // Pull a product from the array
  $product = $products[0];
}

Retrieve Product Details

// $product is a product from the listings call above
if( method_exists('Wp_Creditoffers', 'get_product_details' ) {
  // Pull product details from API or cache
  $product_details = Wp_Creditoffers::get_product_details($product->productType, $product->productId);
}

Details

  • Product Detail Cache is stored in wp_co_product_details table
  • Encrypted data and listings are stored in wp_options table

Option Names

  • co_ini_path - path of file containing pkcs12 password
  • co_client_credentials - encrypted client credentials
  • co_pkcs12 - base64 encoded pkcs12 key
  • co_public_key - derived public key
  • co_access_token - encrypted access token
  • co_access_token_expiry - access token expiry
  • co_product_listings - cached product listings
  • co_product_listings_expiry - product listing expiry

Contributors:

We welcome your interest in Capital One’s Open Source Project (the “Project”). Any Contributor to the Project must accept and sign a CLA indicating agreement to the license terms. Except for the license granted in this CLA to Capital One and to recipients of software distributed by Capital One, you reserve all right, title, and interest in and to your contributions; this CLA does not impact your rights to use your own contributions for any other purpose.

Link to Individual CLA

Link to Corporate CLA

This project adheres to the Open Source Code of Conduct. By participating, you are expected to honor this code.

credit-offers-wordpress-plugin's People

Contributors

davidbenko avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.