This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php require __DIR__ . '/vendor/autoload.php'; | |
$lob = new \Lob\Lob('<LOB_TEST_API_KEY>'); | |
$to = json_decode('{ | |
"name": "Harry Zhang", | |
"address_line1": "210 King Street", | |
"address_city": "San Francisco", | |
"address_state": "CA", | |
"address_zip": "94107" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'lob.rb' | |
require 'pp' | |
require 'rubygems' | |
require 'json' | |
lob = Lob::Client.new(api_key: "<LOB_TEST_API_KEY>") | |
to_address = '{ | |
"name": "Harry Zhang", | |
"address_line1": "210 King Street", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lob | |
lob.api_key = "<LOB_TEST_API_KEY>" | |
toAddress = { | |
"name": "Harry Zhang", | |
"address_line1": "210 King Street", | |
"address_city": "San Francisco", | |
"address_state": "CA", | |
"address_zip": "94107" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Configuration, Postcard, PostcardsApi, PostcardEditable, AddressEditable } from "@lob/lob-typescript-sdk" | |
async function demo() { | |
const config: Configuration = new Configuration({ | |
username: "<LOB_TEST_API_KEY>" | |
}) | |
let toAddress = new AddressEditable({ | |
name: "Harry Zhang", | |
address_line1: "210 King Street", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bottom of page | |
<script src="https://cdn.lob.com/lob-address-elements/0.1.0/lob-address-elements.min.js" data-lob-key="YOUR_KEY_GOES_HERE" ></script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<label for="primary1">Address 1*</label> | |
<input id="primary1" data-lob-primary> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<label for="primary1">Address</label> | |
<input id="primary1"> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Configuration,Postcard, PostcardsApi, PostcardEditable | |
} from "@lob/lob-typescript-sdk"; | |
async function demo() { | |
const config: Configuration = new Configuration({ | |
username: "<YOUR_TEST_KEY>" | |
}); | |
const postcardData : PostcardEditable = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* GET / route to cancel a check. | |
*/ | |
function cancelACheck(req, res) { | |
const checkId = req.params.checkId | |
Lob.checks.delete(checkId, function (err, response) { | |
const check = response | |
res.render('check', { check }) | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dotenv from 'dotenv'; | |
dotenv.config(); | |
const Lob = require('lob')(process.env.LOB_API_KEY); | |
import Check from "../models/check" | |
/* | |
* GET / route to show the createCheck form. | |
*/ | |
function createCheck(req, res) { | |
//catch any response on the url | |
let response = req.query.response |