qs-php-code
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('<TEST_API_KEY'); | |
$postcard = $lob->postcards()->create(array( | |
"description" => "First Postcard", | |
"to[name]" => "HARRY ZHANG", | |
"to[address_line1]" => "210 KING STREET", | |
"to[address_city]" => "SAN FRANCISCO", | |
"to[address_state]" => "CA", | |
"to[address_zip]" => "94107", | |
"from[name]" => "LEORE AVIDAR", | |
"from[address_line1]" => "210 KING STREET", | |
"from[address_city]" => "SAN FRANCISCO", | |
"from[address_state]" => "CA", | |
"from[address_zip]" => "94107", | |
"front" => "<html style='padding: 1in; font-size: 50;'>Front HTML for {{name}}</html>", | |
"back" => "<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>", | |
"merge_variables[name]" => "Harry" | |
)); | |
print_r($postcard); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment