Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge resolve

  • Loading branch information...
commit bf51bcf50c55aca818c53326214390db4c189f82 2 parents 8b93952 + eb7cb15
@DHS DHS authored
Showing with 14 additions and 13 deletions.
  1. +9 −9 examples/merchant.php
  2. +5 −4 examples/partner.php
View
18 examples/merchant.php
@@ -73,7 +73,7 @@
);
$bill_url = GoCardless::new_bill_url($payment_details);
-echo '<p><a href="'.$bill_url.'">New bill</a>';
+echo '<p><a href="' . $bill_url . '">New bill</a>';
// New subscription
@@ -84,7 +84,7 @@
);
$subscription_url = GoCardless::new_subscription_url($payment_details);
-echo ' &middot; <a href="'.$subscription_url.'">New subscription</a>';
+echo ' &middot; <a href="' . $subscription_url . '">New subscription</a>';
// New pre-authorization
@@ -100,7 +100,7 @@
);
$pre_auth_url = GoCardless::new_pre_authorization_url($payment_details);
-echo ' &middot; <a href="'.$pre_auth_url.'">New pre-authorized payment</a></p>';
+echo ' &middot; <a href="' . $pre_auth_url . '">New pre-authorized payment</a></p>';
echo '<p>NB. The \'new pre-authorization\' link is also a demo of pre-populated
user data.</p>';
@@ -111,7 +111,7 @@
// Merchant API call
-echo 'GoCardless_Merchant::find(\''.$account_details['merchant_id'].'\')';
+echo 'GoCardless_Merchant::find(\'' . $account_details['merchant_id'] . '\')';
echo '<blockquote><pre>';
$merchant = GoCardless_Merchant::find($account_details['merchant_id']);
print_r($merchant);
@@ -119,7 +119,7 @@
// Pre-authorization API calls
-echo 'GoCardless_Merchant::find(\''.$account_details['merchant_id'].'\')->pre_authorizations()';
+echo 'GoCardless_Merchant::find(\'' . $account_details['merchant_id'] . '\')->pre_authorizations()';
echo '<blockquote><pre>';
$preauths = GoCardless_Merchant::find($account_details['merchant_id'])->pre_authorizations();
print_r($preauths);
@@ -145,7 +145,7 @@
// code. NB. This is an example of filtering API results. More info here:
// https://gocardless.com/docs/api_guide#filtering
-//echo 'GoCardless_Merchant::find(\''.$account_details['merchant_id'].'\')->bills(array(\'source_id\' => \'123\'))';
+//echo 'GoCardless_Merchant::find(\'' . $account_details['merchant_id'] . '\')->bills(array(\'source_id\' => \'123\'))';
//echo '<blockquote><pre>';
//$bills = GoCardless_Merchant::find($account_details['merchant_id'])->bills(array('source_id' => '123'));
//print_r($bills);
@@ -153,10 +153,10 @@
// Subscriptions API calls
-echo 'GoCardless_Merchant::find(\''.$account_details['merchant_id'].'\')->subscriptions()';
+echo 'GoCardless_Merchant::find(\'' . $account_details['merchant_id'] . '\')->subscriptions()';
echo '<blockquote><pre>';
-$preauths = GoCardless_Merchant::find($account_details['merchant_id'])->subscriptions();
-print_r($preauths);
+$subscriptions = GoCardless_Merchant::find($account_details['merchant_id'])->subscriptions();
+print_r($subscriptions);
echo '</pre></blockquote>';
// Create a subscription using the url generated above then fetch it's ID
View
9 examples/partner.php
@@ -12,7 +12,8 @@
*
* 1. Sign up for an account at GoCardless.com
* 2. Copy your app id and secret from the developer tab and paste them below
- * 3. Change 'Redirect URI' in the developer tab to point to this page
+ * 3. Change 'Redirect URI' in the developer tab to point to this page and
+ * update it in both places in the code below
* 4. Load the page and click 'authorize app' to generate an access_token
* 5. You can now initialize a Client object using that access_token
*
@@ -83,8 +84,8 @@
<br />Copy and paste this access token into the top of the code for this
page to continue testing the partner demo. In your own app, you\'ll want to
save it to your database.
- <br />Access token: '.$account_details['access_token'].'
- <br />Merchant id: '.$account_details['merchant_id'].'</p>';
+ <br />Access token: ' . $account_details['access_token'] . '
+ <br />Merchant id: ' . $account_details['merchant_id'] . '</p>';
}
@@ -156,6 +157,6 @@
'redirect_uri' => 'http://localhost/examples/partner.php'
);
$authorize_url = $gocardless_client->authorize_url($authorize_url_options);
- echo '<p><a href="'.$authorize_url.'">Authorize app</a></p>';
+ echo '<p><a href="' . $authorize_url . '">Authorize app</a></p>';
}
Please sign in to comment.
Something went wrong with that request. Please try again.