Browse Source

Added email address for receipts

main
parent
commit
6915abd9fd
Signed by: aayla GPG Key ID: 8B7D674007FA725F
1 changed files with 3 additions and 8 deletions
  1. +3
    -8
      res/php/payment/charge.php

+ 3
- 8
res/php/payment/charge.php View File

@ -25,14 +25,8 @@ use Stripe\StripeClient;
use Mailgun\Mailgun;
// Function definitions
function sendMail($name, $address, $subject, $text, $html) {
// Load keyfile for authentication
$keyfile = json_decode(file_get_contents("/etc/srasite/keys.json"), true);
// Create a Mailgun object
$mg = Mailgun::create($keyfile["mailgun"]);
}
function charge($amount, $token, $description) {
function charge($amount, $token, $description, $email) {
// Load keyfile
$keyfile = file_get_contents("/etc/srasite/keys.json");
$keyfile = json_decode($keyfile, true);
@ -43,7 +37,8 @@ function charge($amount, $token, $description) {
"amount" => $amount,
"currency" => "usd",
"source" => $token,
"description" => $description
"description" => $description,
"receipt_email" => $email
]);
return $response->status;
}

Loading…
Cancel
Save