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
<form class="new_ticket" id="new_ticket" action="/tickets" accept-charset="UTF-8" method="post"> | |
<input name="utf8" type="hidden" value="✓" /> | |
<fieldset class="form-group"> | |
<label for="ticket_name">Name</label> | |
<input placeholder="What's your name" class="form-control input-short" required="required" type="text" name="ticket[name]" id="ticket_name" /> | |
</fieldset> | |
<fieldset class="form-group"> | |
<label for="ticket_email">Email</label> | |
<input placeholder="Where can we email you?" class="form-control input-short" required="required" type="email" name="ticket[email]" id="ticket_email" /> |
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
stripe.charges.createRefund( | |
req.params.chargeId, | |
{refund_application_fee: true}, | |
{stripe_account: req.params.stripeConnectedAccount}, | |
function(err, refund) { | |
if (err) { | |
res.error(err); | |
console.log(err); | |
} |
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
<? | |
include('library/init.php'); | |
\Stripe\Stripe::setApiKey("sk_test_xxxxxxx"); | |
$dp = \Stripe\Dispute::retrieve("dp_xxxxxxxxx"); | |
$dp->evidence["customer_name"]="[email protected]"; | |
$dp->evidence["shipping_date"] = "2016-03-06"; |
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
Users.findOne({"id":user_id}).exec(function(err, user) { | |
stripe.customers.create({ //this saves the user to the platform account | |
source: tokenID, | |
email: user.email, | |
description: "Example customer" | |
}, function (err, customer) { | |
user.stripe_cust=customer.id; | |
//this attempts to create a token associated to the connected account id | |
stripe.tokens.create( |
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
#Retrieve account details request - getting a "Invalid API Key provided: acct_************xxxx" error | |
curl https://api.stripe.com/v1/account \ | |
-u [LIVE SECRET KEY]: \ | |
-H Stripe-Account:[acct_xxxxxxxxxxxxxx] #the connected account ID | |
#Transfering $ to a connected account - getting a "Cannot transfer to an unconnected destination account." error | |
curl https://api.stripe.com/v1/transfers \ | |
-u [LIVE SECRET KEY]: \ | |
-d amount=xxxx \ |
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
//you see i console the all allParams in the create action. if i submit the form with empty value | |
//the comsole will be {username: '',email:'' .......}.i think if the value == '',this will directly return the badRequest to | |
//client. the problem is very strange.i did not write anything to stop the create.if the next() run, i should be run the User.create//(),right?because the form is empty, the User.create will throw the some error,like the username should not be empty. | |
//policy | |
module.exports = function(req, res, next) { | |
for(var value in req.allParams()){ | |
if(value == ""){ | |
console.log(value); | |
return res.badRequest('some input value is empty'); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<title>Stripe Getting Started Form</title> | |
<!-- The required Stripe lib --> | |
<script type="text/javascript" src="https://js.stripe.com/v2/"></script> | |
<!-- jQuery is used only for this example; it isn't required to use Stripe --> |
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
NSDictionary *achInfo = @{@"country":@"US", @"routing_number":rountingNumber, @"account_number":accountNumber}; | |
NSDictionary *dataDictionary = @{@"bank_account[country]": @"US", | |
@"bank_account[routing_number]" : rountingNumber, | |
@"bank_account[account_number]" : accountNumber}; |
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
## CREATE THE INDEX WITH ANALYZERS AND MAPPINGS | |
curl -XPUT 'http://127.0.0.1:9200/eshtml/?pretty=1' -d ' | |
{ | |
"mappings" : { | |
"page" : { | |
"dynamic":false, | |
"properties" : { | |
"title" : { | |
"fields" : { |
NewerOlder