payment Card first 4 payments inc. mails
This commit is contained in:
parent
c20deac3fe
commit
6e3adac4d7
38 changed files with 3063 additions and 921 deletions
3
.env
3
.env
|
|
@ -4,11 +4,12 @@ APP_DEBUG=true
|
|||
APP_KEY=base64:HrWQ9AV3Zt2TU0iq1OeUUpTUaXwNUdh8xHmx7RXTif4=
|
||||
APP_URL=https://mivita.local/
|
||||
APP_DOMAIN=mivita.local
|
||||
APP_PROTOCOL=https://
|
||||
APP_PROTOCOL=http://
|
||||
APP_URL_MAIN=
|
||||
APP_URL_CHECKOUT=checkout.
|
||||
#APP_URL_MAIN=dev.
|
||||
APP_URL_CRM=mein.
|
||||
APP_CHECKOUT_MAIL=k.adametz@kagado.de
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
|
||||
|
|
|
|||
1167
.idea/workspace.xml
generated
1167
.idea/workspace.xml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -5,7 +5,7 @@ namespace PHPSTORM_META {
|
|||
|
||||
/**
|
||||
* PhpStorm Meta file, to provide autocomplete information for PhpStorm
|
||||
* Generated on 2019-02-21 17:50:01.
|
||||
* Generated on 2019-02-26 16:09:06.
|
||||
*
|
||||
* @author Barry vd. Heuvel <barryvdh@gmail.com>
|
||||
* @see https://github.com/barryvdh/laravel-ide-helper
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/**
|
||||
* A helper file for Laravel 5, to provide autocomplete information to your IDE
|
||||
* Generated for Laravel 5.6.39 on 2019-02-21 17:50:01.
|
||||
* Generated for Laravel 5.6.39 on 2019-02-26 16:09:06.
|
||||
*
|
||||
* This file should not be included in your code, only analyzed by your IDE!
|
||||
*
|
||||
|
|
|
|||
|
|
@ -132,6 +132,37 @@ namespace App\Models{
|
|||
class Category extends \Eloquent {}
|
||||
}
|
||||
|
||||
namespace App\Models{
|
||||
/**
|
||||
* App\Models\ShoppingOrderItem
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $shopping_order_id
|
||||
* @property string|null $row_id
|
||||
* @property int $product_id
|
||||
* @property int|null $qty
|
||||
* @property float|null $price
|
||||
* @property string|null $slug
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read \App\Models\Product $product
|
||||
* @property-read \App\Models\ShoppingOrder $shopping_order
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem wherePrice($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereProductId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereQty($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereRowId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereShoppingOrderId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereSlug($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereUpdatedAt($value)
|
||||
*/
|
||||
class ShoppingOrderItem extends \Eloquent {}
|
||||
}
|
||||
|
||||
namespace App\Models{
|
||||
/**
|
||||
* App\Models\UserUpdateEmail
|
||||
|
|
@ -187,6 +218,97 @@ namespace App\Models{
|
|||
class ShippingPrice extends \Eloquent {}
|
||||
}
|
||||
|
||||
namespace App\Models{
|
||||
/**
|
||||
* App\Models\ShoppingUser
|
||||
*
|
||||
* @property int $id
|
||||
* @property string|null $billing_salutation
|
||||
* @property string|null $billing_company
|
||||
* @property string|null $billing_firstname
|
||||
* @property string|null $billing_lastname
|
||||
* @property string|null $billing_address
|
||||
* @property string|null $billing_address_2
|
||||
* @property string|null $billing_zipcode
|
||||
* @property string|null $billing_city
|
||||
* @property int $billing_country_id
|
||||
* @property string|null $billing_phone
|
||||
* @property string|null $billing_email
|
||||
* @property int $accepted_data_checkbox
|
||||
* @property int $same_as_billing
|
||||
* @property string|null $shipping_salutation
|
||||
* @property string|null $shipping_company
|
||||
* @property string|null $shipping_firstname
|
||||
* @property string|null $shipping_lastname
|
||||
* @property string|null $shipping_address
|
||||
* @property string|null $shipping_address_2
|
||||
* @property string|null $shipping_zipcode
|
||||
* @property string|null $shipping_city
|
||||
* @property int $shipping_country_id
|
||||
* @property string|null $shipping_phone
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ShoppingOrder[] $Shopping_orders
|
||||
* @property-read \App\Models\Country $billing_country
|
||||
* @property-read \App\Models\Country $shipping_country
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereAcceptedDataCheckbox($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingAddress($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingAddress2($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingCity($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingCompany($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingCountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingEmail($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingFirstname($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingLastname($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingPhone($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingSalutation($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingZipcode($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereSameAsBilling($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingAddress($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingAddress2($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingCity($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingCompany($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingCountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingFirstname($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingLastname($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingPhone($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingSalutation($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingZipcode($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereUpdatedAt($value)
|
||||
*/
|
||||
class ShoppingUser extends \Eloquent {}
|
||||
}
|
||||
|
||||
namespace App\Models{
|
||||
/**
|
||||
* App\Models\ShoppingInstance
|
||||
*
|
||||
* @property string $identifier
|
||||
* @property int $user_shop_id
|
||||
* @property int $country_id
|
||||
* @property string $subdomain
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read \App\Models\Country $country
|
||||
* @property-read \App\Models\UserShop $user_shop
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingInstance newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingInstance newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingInstance query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingInstance whereCountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingInstance whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingInstance whereIdentifier($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingInstance whereSubdomain($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingInstance whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingInstance whereUserShopId($value)
|
||||
*/
|
||||
class ShoppingInstance extends \Eloquent {}
|
||||
}
|
||||
|
||||
namespace App\Models{
|
||||
/**
|
||||
* App\Models\Product
|
||||
|
|
@ -358,6 +480,81 @@ namespace App\Models{
|
|||
class ProductImage extends \Eloquent {}
|
||||
}
|
||||
|
||||
namespace App\Models{
|
||||
/**
|
||||
* App\Models\ShoppingPayment
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $shopping_order_id
|
||||
* @property string $clearingtype
|
||||
* @property string|null $wallettype
|
||||
* @property string|null $onlinebanktransfertype
|
||||
* @property string $reference
|
||||
* @property int $amount
|
||||
* @property string $currency
|
||||
* @property int|null $status
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\PaymentTransaction[] $payment_transactions
|
||||
* @property-read \App\Models\ShoppingOrder $shopping_order
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment whereAmount($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment whereClearingtype($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment whereCurrency($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment whereOnlinebanktransfertype($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment whereReference($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment whereShoppingOrderId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment whereStatus($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment whereWallettype($value)
|
||||
*/
|
||||
class ShoppingPayment extends \Eloquent {}
|
||||
}
|
||||
|
||||
namespace App\Models{
|
||||
/**
|
||||
* App\Models\PaymentTransaction
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $shopping_payment_id
|
||||
* @property string $request
|
||||
* @property int $txid
|
||||
* @property int $userid
|
||||
* @property string|null $status
|
||||
* @property string|null $key
|
||||
* @property string|null $txaction
|
||||
* @property string|null $transmitted_data
|
||||
* @property int|null $errorcode
|
||||
* @property string|null $errormessage
|
||||
* @property string|null $customermessage
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read \App\Models\ShoppingPayment $shopping_order
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereCustomermessage($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereErrorcode($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereErrormessage($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereKey($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereRequest($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereShoppingPaymentId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereStatus($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereTransmittedData($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereTxaction($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereTxid($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereUserid($value)
|
||||
*/
|
||||
class PaymentTransaction extends \Eloquent {}
|
||||
}
|
||||
|
||||
namespace App\Models{
|
||||
/**
|
||||
* App\Models\Attribute
|
||||
|
|
@ -390,6 +587,50 @@ namespace App\Models{
|
|||
class Attribute extends \Eloquent {}
|
||||
}
|
||||
|
||||
namespace App\Models{
|
||||
/**
|
||||
* App\Models\ShoppingOrder
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $shopping_user_id
|
||||
* @property int $country_id
|
||||
* @property int $user_shop_id
|
||||
* @property float|null $total
|
||||
* @property float|null $shipping
|
||||
* @property float|null $subtotal
|
||||
* @property float|null $tax_rate
|
||||
* @property float|null $tax
|
||||
* @property float|null $total_shipping
|
||||
* @property int|null $weight
|
||||
* @property int|null $paid
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read \App\Models\Country $country
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ShoppingOrderItem[] $shopping_order_items
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ShoppingPayment[] $shopping_payments
|
||||
* @property-read \App\Models\ShoppingUser $shopping_user
|
||||
* @property-read \App\Models\UserShop $user_shop
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereCountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder wherePaid($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereShipping($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereShoppingUserId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereSubtotal($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereTax($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereTaxRate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereTotal($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereTotalShipping($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereUserShopId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereWeight($value)
|
||||
*/
|
||||
class ShoppingOrder extends \Eloquent {}
|
||||
}
|
||||
|
||||
namespace App\Models{
|
||||
/**
|
||||
* App\Models\UserAccount
|
||||
|
|
|
|||
|
|
@ -1,12 +1,5 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Pay;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Payone;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
||||
/*
|
||||
* clearingtype
|
||||
elv Debit payment
|
||||
|
|
@ -18,8 +11,27 @@ sb Online Bank Transfer
|
|||
wlt e-wallet
|
||||
fnc Financing
|
||||
*/
|
||||
/*private $payment_methods= [
|
||||
'wlt#PPE' => 'PayPal',
|
||||
'cc' => 'CreditCard',
|
||||
'sb#GPY' => 'giropay',
|
||||
'sb#PNT' => 'Sofort',
|
||||
'wlt#PDT' => 'paydirekt',
|
||||
'fnc' => 'Rechnungskauf',
|
||||
'pref' => 'Vorauskasse',
|
||||
];*/
|
||||
|
||||
|
||||
namespace App\Http\Controllers\Pay;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\PaymentTransaction;
|
||||
use App\Models\ShoppingPayment;
|
||||
use App\Services\Payone;
|
||||
use Illuminate\Http\Request;
|
||||
use Util;
|
||||
use Yard;
|
||||
|
||||
|
||||
class PayoneController extends Controller
|
||||
{
|
||||
|
|
@ -30,210 +42,264 @@ class PayoneController extends Controller
|
|||
const REFUND = 'refund';
|
||||
const DEBIT = 'debit';
|
||||
|
||||
|
||||
private $default = [];
|
||||
|
||||
private $personalData = [];
|
||||
private $deliveryData = [];
|
||||
|
||||
private $method = [];
|
||||
private $prepayment = [];
|
||||
private $onlineTransfer = [];
|
||||
private $creditCard = [];
|
||||
|
||||
private $url = [];
|
||||
/* private $onlineTransfer = [];
|
||||
private $creditCard = []; */
|
||||
private $deliveryData = [];
|
||||
|
||||
|
||||
// private $payment_method;
|
||||
private $urls = [];
|
||||
|
||||
private $shopping_user;
|
||||
private $shopping_order;
|
||||
private $shopping_payment;
|
||||
|
||||
private $reference;
|
||||
|
||||
public function __construct() {
|
||||
|
||||
$this->default = \Config::get('payone.defaults');
|
||||
}
|
||||
|
||||
|
||||
public function init($shopping_user, $shopping_order){
|
||||
$this->shopping_user = $shopping_user;
|
||||
$this->shopping_order = $shopping_order;
|
||||
}
|
||||
|
||||
public function getShoppingPayment(){
|
||||
return $this->shopping_payment;
|
||||
}
|
||||
|
||||
//make Payone payment
|
||||
public function setPrePayment($payment_method, $amount, $currency, $cc_ret = []){
|
||||
|
||||
$this->reference = substr(uniqid(true), 0, 16);
|
||||
$this->setMethod($payment_method, $cc_ret);
|
||||
|
||||
$this->urls = [
|
||||
'successurl' => route('checkout.transaction_status', ['success', $this->reference]),
|
||||
'errorurl' => route('checkout.transaction_status', ['error', $this->reference]),
|
||||
'backurl' => route('checkout.transaction_status', ['cancel', $this->reference]),
|
||||
];
|
||||
|
||||
$this->prepayment = [
|
||||
"reference" => $this->reference, // a unique reference, e.g. order number
|
||||
"amount" => $amount, // amount in smallest currency unit, i.e. cents
|
||||
"currency" => $currency,
|
||||
"param" => $this->shopping_order->id,
|
||||
|
||||
];
|
||||
|
||||
$this->shopping_payment = ShoppingPayment::create([
|
||||
'shopping_order_id' => $this->shopping_order->id,
|
||||
'clearingtype' => $this->method["clearingtype"],
|
||||
'wallettype' => $this->method["wallettype"],
|
||||
'onlinebanktransfertype' => $this->method["onlinebanktransfertype"],
|
||||
'reference' => $this->reference,
|
||||
'amount' => $amount,
|
||||
'currency' => $currency,
|
||||
]);
|
||||
|
||||
return $this->reference;
|
||||
}
|
||||
|
||||
public function setPersonalData($data){
|
||||
|
||||
$this->personalData = [
|
||||
// "salutation" => "Mr.",
|
||||
// "firstname" => "Henry",
|
||||
"lastname" => "Player", // mandatory
|
||||
// "street" => "Royal Street 1",
|
||||
// "zip" => "24118",
|
||||
// "city" => "Kiel",
|
||||
"country" => "DE", // mandatory
|
||||
//"email" => " info-buyer@mivita.care",
|
||||
"language" => "de"
|
||||
];
|
||||
|
||||
|
||||
/* $this->personalData = array(
|
||||
"salutation" => "Herr",
|
||||
"title" => "Dr.",
|
||||
"firstname" => "Paul",
|
||||
"lastname" => "Neverpayer",
|
||||
"street" => "Fraunhoferstraße 2-4",
|
||||
"addressaddition" => "EG",
|
||||
"zip" => "24118",
|
||||
"city" => "Kiel",
|
||||
"country" => "DE",
|
||||
"email" => "paul.neverpayer@payone.de",
|
||||
"telephonenumber" => "043125968500",
|
||||
"birthday" => "19700204",
|
||||
"language" => "de",
|
||||
"gender" => "m",
|
||||
"ip" => "8.8.8.8"
|
||||
);
|
||||
*/
|
||||
|
||||
/**
|
||||
* Paydirekt requires both, personal data and shipping data
|
||||
*/
|
||||
/* $this->deliveryData = array(
|
||||
"shipping_firstname" => "Paul",
|
||||
"shipping_lastname" => "Neverpayer",
|
||||
"shipping_street" => "Hamburger Allee 26-28",
|
||||
"shipping_zip" => "60486",
|
||||
"shipping_city" => "Frankfurt am Main",
|
||||
"shipping_country" => "DE"
|
||||
);*/
|
||||
|
||||
|
||||
|
||||
public function __construct($payment_method = null) {
|
||||
|
||||
}
|
||||
|
||||
private function setMethod($payment_method, $cc_ret = []){
|
||||
|
||||
if($payment_method){
|
||||
|
||||
if(strpos($payment_method, '#')){
|
||||
$payment_method = explode('#', $payment_method);
|
||||
//wallet
|
||||
//wallet Paypal
|
||||
if($payment_method[0] == 'wlt'){
|
||||
$this->method = [
|
||||
"clearingtype" => "wlt",
|
||||
"wallettype" => $payment_method[1],
|
||||
"request" => "authorization",
|
||||
'onlinebanktransfertype' => "",
|
||||
"request" => "authorization"
|
||||
];
|
||||
}
|
||||
//Online-Überweisung
|
||||
if($payment_method[0] == 'sb'){
|
||||
$this->method = [
|
||||
"clearingtype" => "sb",
|
||||
"wallettype" => "",
|
||||
"onlinebanktransfertype" => $payment_method[1], // this is the type for Sofort.com
|
||||
"bankcountry" => "DE", // we need to know the country of the customer's bank, i.e. of the invoice address
|
||||
"request" => "authorization",
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
//Rechnungskauf
|
||||
/* if($payment_method[0]== 'fnc'){
|
||||
$this->method = [
|
||||
"clearingtype" => "fnc",
|
||||
"wallettype" => "",
|
||||
'onlinebanktransfertype' => "",
|
||||
"financingtype" => "PYV",
|
||||
"request" => "genericpayment",
|
||||
"add_paydata[action]" => "pre_check",
|
||||
"add_paydata[payment_type]" => "Payolution-Invoicing",
|
||||
];
|
||||
}
|
||||
*/
|
||||
}
|
||||
//vorkasse
|
||||
if($payment_method == 'vor'){
|
||||
$this->method = [
|
||||
"clearingtype" => "vor",
|
||||
"wallettype" => "",
|
||||
'onlinebanktransfertype' => "",
|
||||
"request" => "preauthorization",
|
||||
];
|
||||
}
|
||||
//CreditCard
|
||||
if($payment_method == 'cc'){
|
||||
//need the $cc_ret
|
||||
$this->method = [
|
||||
"clearingtype" => "cc",
|
||||
"wallettype" => "",
|
||||
'onlinebanktransfertype' => "",
|
||||
"request" => "authorization",
|
||||
"pseudocardpan" => $cc_ret['pseudocardpan']
|
||||
//"xid" => "3-D Secure transaction ID"
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
$this->default = \Config::get('payone.defaults');
|
||||
$this->url['successurl'] = route('checkout.transaction_status', ['success']);
|
||||
$this->url['errorurl'] = route('checkout.transaction_status', ['error']);
|
||||
$this->url['backurl'] = route('checkout.transaction_status', ['cancel']);
|
||||
|
||||
}
|
||||
|
||||
//make Payone payment
|
||||
|
||||
public function setPrePayment($data){
|
||||
|
||||
/* $this->prepayment = [
|
||||
"clearingtype" => "sb", // sb means online bank transfer
|
||||
"reference" => time(), // a unique reference, e.g. order number
|
||||
"amount" => "10000", // amount in smallest currency unit, i.e. cents
|
||||
"currency" => "EUR",
|
||||
"request" => "preauthorization", // create account receivable and instantly book the amount
|
||||
"onlinebanktransfertype" => "PNT", // this is the type for Sofort.com
|
||||
"bankcountry" => "DE", // we need to know the country of the customer's bank, i.e. of the invoice add
|
||||
//"request" => "preauthorization" // create account receivable
|
||||
];*/
|
||||
|
||||
$this->prepayment = [
|
||||
"reference" => time(), // a unique reference, e.g. order number
|
||||
"amount" => "10000", // amount in smallest currency unit, i.e. cents
|
||||
"currency" => "EUR",
|
||||
|
||||
|
||||
/* "clearingtype" => "wlt", // sb means online bank transfer
|
||||
"wallettype" => "PPE",
|
||||
"request" => "authorization",
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* "request" => "preauthorization",
|
||||
"cardpan" => "4301111100070203",
|
||||
"cardexpiredate" => "2105",
|
||||
"cardtype" => "V",
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
//"pseudocardpan" => "9410009000000005606",
|
||||
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
public function creditCardCheck($data){
|
||||
|
||||
$this->prepayment = [
|
||||
"request" => "creditcardcheck", // create account receivable and instantly book the amount
|
||||
"cardpan" => "4111111111111111",
|
||||
"cardexpiredate" => "2105",
|
||||
"cardtype" => "V",
|
||||
"cardcvc2" => "123",
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
public function setPersonalData($data){
|
||||
|
||||
$this->personalData = [
|
||||
// "salutation" => "Mr.",
|
||||
// "firstname" => "Henry",
|
||||
"lastname" => "Payer", // mandatory
|
||||
// "street" => "Royal Street 1",
|
||||
// "zip" => "24118",
|
||||
// "city" => "Kiel",
|
||||
"country" => "DE", // mandatory
|
||||
// "email" => "henry.viii@tudor.gov.uk",
|
||||
"language" => "de"
|
||||
];
|
||||
}
|
||||
|
||||
public function setDeliverylData($data){
|
||||
$this->deliveryData = [
|
||||
"shipping_company" => "Mr.",
|
||||
"shipping_firstname" => "Henry",
|
||||
"shipping_lastname" => "Tudor",
|
||||
"shipping_street" => "Royal Street 1",
|
||||
"shipping_zip" => "24118",
|
||||
"shipping_city" => "Kiel",
|
||||
"shipping_country" => "DE",
|
||||
];
|
||||
}
|
||||
|
||||
public function checkStatus(){
|
||||
// again, the default values will be needed
|
||||
$capture = array(
|
||||
"request" => "capture",
|
||||
"txid" => "your_txid",
|
||||
"sequencenumber" => "previous_sequencenumber_plus_one", // get this from the last received transactionsstatus
|
||||
"amount" => "your_amount", // you can either capture the full amount of the tx, or less
|
||||
"currency" => "EUR"
|
||||
);
|
||||
$request = array_merge($this->default, $capture);
|
||||
$response = Payone::sendRequest($request);
|
||||
|
||||
}
|
||||
|
||||
public function ResponseData(){
|
||||
|
||||
|
||||
$request = array_merge($this->default, $this->personalData, $this->deliveryData, $this->method, $this->prepayment, $this->urls);
|
||||
|
||||
|
||||
|
||||
$request = array_merge($this->default, $this->personalData, $this->method, $this->prepayment, $this->url);
|
||||
// var_dump($request);
|
||||
// echo "<br><br><br>";
|
||||
$response = Payone::sendRequest($request);
|
||||
/*
|
||||
* status APPROVED / REDIRECT / ERROR / PENDING
|
||||
* */
|
||||
|
||||
//cc
|
||||
|
||||
var_dump($response);
|
||||
die();
|
||||
if ($response["status"] == "REDIRECT") { // this happens when the card needs a 3d secure verification
|
||||
header("Location: " . $response["redirecturl"]); // or other redirect method
|
||||
} elseif ($response["status"] == "APPROVED") { // no 3d secure verification required, transaction went through
|
||||
echo "Thank you for your purchase.";
|
||||
var_dump($response);
|
||||
die();
|
||||
} else {
|
||||
echo "There has been an error processing your request.";
|
||||
var_dump($response);
|
||||
die();
|
||||
*/
|
||||
if($response['status'] == 'ERROR'){
|
||||
PaymentTransaction::create([
|
||||
'shopping_payment_id' => $this->shopping_payment->id,
|
||||
'request' => $this->method['request'],
|
||||
'errorcode' => $response['errorcode'],
|
||||
'errormessage' => $response['errormessage'],
|
||||
'customermessage' => $response['customermessage'],
|
||||
'status' => $response['status'],
|
||||
]);
|
||||
\Session::flash('errormessage', $response['errormessage']);
|
||||
\Session::flash('customermessage', $response['customermessage']);
|
||||
return redirect(route('checkout.checkout_card'));
|
||||
}
|
||||
|
||||
|
||||
if($response['status'] == 'REDIRECT'){
|
||||
PaymentTransaction::create([
|
||||
'shopping_payment_id' => $this->shopping_payment->id,
|
||||
'request' => $this->method['request'],
|
||||
'txid' => $response['txid'],
|
||||
'userid' => $response['userid'],
|
||||
'status' => $response['status'],
|
||||
]);
|
||||
return redirect()->away($response["redirecturl"]);
|
||||
exit;
|
||||
|
||||
}
|
||||
|
||||
if($response['status'] == 'APPROVED'){
|
||||
// header("Location: " . $response["redirecturl"]); // or other redirect method
|
||||
var_dump($response);
|
||||
die();
|
||||
//txid
|
||||
//Payment process ID (PAYONE)
|
||||
//userid
|
||||
//Debtor ID (PAYONE)
|
||||
}
|
||||
if($response['status'] == 'REDIRECT'){
|
||||
header("Location: " . $response["redirecturl"]); // or other redirect method
|
||||
$payt = PaymentTransaction::create([
|
||||
'shopping_payment_id' => $this->shopping_payment->id,
|
||||
'request' => $this->method['request'],
|
||||
'txid' => $response['txid'],
|
||||
'userid' => $response['userid'],
|
||||
'status' => $response['status'],
|
||||
'transmitted_data' => $response,
|
||||
]);
|
||||
|
||||
if($payt->shopping_payment->clearingtype == "vor"){
|
||||
//vorkasse
|
||||
return redirect(route('checkout.transaction_approved', [$payt->id, $this->reference]));
|
||||
exit;
|
||||
}
|
||||
|
||||
if($payt->shopping_payment->clearingtype == "cc"){
|
||||
//creditcard
|
||||
return redirect(route('checkout.transaction_approved', [$payt->id, $this->reference]));
|
||||
exit;
|
||||
}
|
||||
|
||||
var_dump($response);
|
||||
die();
|
||||
//txid
|
||||
//Payment process ID (PAYONE)
|
||||
//userid
|
||||
//Debtor ID (PAYONE)
|
||||
//redirecturl
|
||||
//Redirect URL
|
||||
}
|
||||
if($response['status'] == 'ERROR'){
|
||||
var_dump($response);
|
||||
die();
|
||||
//errorcode
|
||||
//Error number
|
||||
//errormessage
|
||||
//Error message for the merchant
|
||||
//customermessage
|
||||
// Error message for the end customer
|
||||
}
|
||||
|
||||
|
||||
if($response['status'] == 'PENDING'){
|
||||
var_dump($response);
|
||||
die();
|
||||
|
|
@ -248,54 +314,92 @@ class PayoneController extends Controller
|
|||
|
||||
|
||||
|
||||
public function checkCreditCard($data)
|
||||
{
|
||||
$this->prepayment = [
|
||||
"request" => "creditcardcheck", // create account receivable and instantly book the amount
|
||||
"cardholder" => $data['cc_cardholder_first']." ".$data['cc_cardholder_last'],
|
||||
"cardpan" => $data['cc_cardpan'],
|
||||
"cardexpiredate" => substr($data['cc_cardexpireyear'], -2) . $data['cc_cardexpiremonth'],
|
||||
"cardtype" => $data['cc_cardtype'],
|
||||
"cardcvc2" => $data['cc_cardcvc2'],
|
||||
"storecarddata" => 'yes',
|
||||
"language" => 'de',
|
||||
];
|
||||
$request = array_merge($this->default, $this->prepayment);
|
||||
$response = Payone::sendRequest($request);
|
||||
return $response;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* public function checkStatus(){
|
||||
// again, the default values will be needed
|
||||
$capture = array(
|
||||
"request" => "capture",
|
||||
"txid" => "your_txid",
|
||||
"sequencenumber" => "previous_sequencenumber_plus_one", // get this from the last received transactionsstatus
|
||||
"amount" => "your_amount", // you can either capture the full amount of the tx, or less
|
||||
"currency" => "EUR"
|
||||
);
|
||||
$request = array_merge($this->default, $capture);
|
||||
$response = Payone::sendRequest($request);
|
||||
|
||||
} */
|
||||
|
||||
|
||||
//set for clearingtype
|
||||
//debit payment
|
||||
/*
|
||||
*
|
||||
* ["clearing_bankaccount"]=> string(10) "2599100003"
|
||||
["clearing_bankcode"]=> string(8) "12345678"
|
||||
["clearing_bankcountry"]=> string(2) "DE"
|
||||
["clearing_bankname"]=> string(8) "Testbank"
|
||||
["clearing_bankaccountholder"]=> string(11) "Test Nutzer"
|
||||
["clearing_bankcity"]=> string(4) "Kiel"
|
||||
["clearing_bankiban"]=> string(22) "DE00123456782599100003"
|
||||
["clearing_bankbic"]=> string(8) "TESTTEST" }
|
||||
*/
|
||||
/*
|
||||
* PNT Sofortbanking (DE, AT, CH, NL)
|
||||
GPY giropay (DE)
|
||||
EPS eps – online transfer (AT)
|
||||
PFF PostFinance E-Finance (CH)
|
||||
PFC PostFinance Card (CH)
|
||||
IDL iDEAL (NL)
|
||||
P24 Przelewy24 (PL)
|
||||
BCT Bancontact*/
|
||||
/*
|
||||
* iban
|
||||
* bic
|
||||
* bankcountry*/
|
||||
public function setOnlineTransfer($data){
|
||||
/*
|
||||
* PNT Sofortbanking (DE, AT, CH, NL)
|
||||
GPY giropay (DE)
|
||||
EPS eps – online transfer (AT)
|
||||
PFF PostFinance E-Finance (CH)
|
||||
PFC PostFinance Card (CH)
|
||||
IDL iDEAL (NL)
|
||||
P24 Przelewy24 (PL)
|
||||
BCT Bancontact*/
|
||||
$this->onlineTransfer = [
|
||||
"onlinebanktransfertype" => "PNT",
|
||||
"bankcountry" => "DE",
|
||||
// "iban" => "",
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
public function setCreditCard(){
|
||||
/*
|
||||
* Card type
|
||||
/* * Card type
|
||||
V Visa
|
||||
M MasterCard
|
||||
A American Express
|
||||
D Diners / Discover
|
||||
J JCB
|
||||
O Maestro International
|
||||
*/
|
||||
$this->creditCard = [
|
||||
"cardpan" => "number",
|
||||
"cardtype" => "V",
|
||||
"cardexpiredate" => "YYMM",
|
||||
// "cardcvc2" => "Credit verification number (CVC)",
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function setDeliverylData($data){
|
||||
$this->deliveryData = [
|
||||
"shipping_company" => "Mr.",
|
||||
"shipping_firstname" => "Henry",
|
||||
"shipping_lastname" => "Tudor",
|
||||
"shipping_street" => "Royal Street 1",
|
||||
"shipping_zip" => "24118",
|
||||
"shipping_city" => "Kiel",
|
||||
"shipping_country" => "DE",
|
||||
];
|
||||
|
||||
/*3-D Secure*/
|
||||
$this->creditCard['xid'] = "3-D Secure transaction ID";
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,6 @@ class CardController extends Controller
|
|||
|
||||
$user_shop = Util::getUserShop();
|
||||
|
||||
|
||||
do {
|
||||
$identifier = Util::getToken();
|
||||
} while( ShoppingInstance::where('identifier', $identifier)->count() );
|
||||
|
|
@ -113,6 +112,11 @@ class CardController extends Controller
|
|||
return redirect()->secure($path);
|
||||
}
|
||||
|
||||
public function backToShop(){
|
||||
$this->deleteCard();
|
||||
return redirect(url('/'));
|
||||
|
||||
}
|
||||
public function removeCard($rowId){
|
||||
|
||||
Yard::instance('shopping')->remove($rowId);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,15 @@ namespace App\Http\Controllers\Web;
|
|||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Controllers\Pay\PayoneController;
|
||||
use App\Models\Product;
|
||||
use App\Mail\MailCheckout;
|
||||
use App\Models\PaymentTransaction;
|
||||
use App\Models\ShoppingOrder;
|
||||
use App\Models\ShoppingOrderItem;
|
||||
use App\Models\ShoppingPayment;
|
||||
use App\Models\ShoppingUser;
|
||||
use Illuminate\Session\SessionManager;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Validator;
|
||||
use App\Services\Util;
|
||||
use Yard;
|
||||
|
|
@ -13,17 +21,20 @@ use Input;
|
|||
|
||||
class CheckoutController extends Controller
|
||||
{
|
||||
private $session;
|
||||
private $instance;
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
public function __construct(SessionManager $session)
|
||||
{
|
||||
$this->session = $session;
|
||||
$this->instance = sprintf('%s.%s', 'cart', 'payments');
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function checkout(){
|
||||
|
||||
$user_shop = Util::getUserShop();
|
||||
|
|
@ -34,82 +45,366 @@ class CheckoutController extends Controller
|
|||
// $ShippingCountry = ShippingCountry::where('country_id', 1)->first();
|
||||
// $selected_country = $ShippingCountry->id;
|
||||
}
|
||||
|
||||
$shopping_user = ShoppingUser::findOrNew($this->getPayments('shopping_user_id'));
|
||||
if($shopping_user->same_as_billing === NULL){
|
||||
$shopping_user->same_as_billing = true;
|
||||
}
|
||||
$data = [
|
||||
'user_shop' => Util::getUserShop(),
|
||||
'shopping_user' => $shopping_user,
|
||||
];
|
||||
return view('web.templates.checkout', $data);
|
||||
}
|
||||
|
||||
public function checkoutFinal(){
|
||||
|
||||
/*$rules = array(
|
||||
'billing.firstname'=>'required',
|
||||
'billing.lastname'=>'required',
|
||||
'billing.email'=>'required|email',
|
||||
'billing.address'=>'required',
|
||||
'billing.zipcode'=>'required',
|
||||
'billing.city' => 'required',
|
||||
/*
|
||||
$rules = array(
|
||||
'billing_salutation' => 'required',
|
||||
'billing_firstname'=>'required',
|
||||
'billing_lastname'=>'required',
|
||||
'billing_email'=>'required|email',
|
||||
'billing_address'=>'required',
|
||||
'billing_zipcode'=>'required',
|
||||
'billing_city' => 'required',
|
||||
'accepted_data_checkbox' => 'accepted',
|
||||
'billing.salutation => 'required'
|
||||
);
|
||||
|
||||
if(!Input::get('shipping.same_as_billing')){
|
||||
if(!Input::get('same_as_billing')){
|
||||
$rules = array_merge($rules, [
|
||||
'shipping.firstname'=>'required',
|
||||
'shipping.lastname'=>'required',
|
||||
'shipping.address'=>'required',
|
||||
'shipping.zipcode'=>'required',
|
||||
'shipping.city' => 'required',
|
||||
'shipping.salutation => 'required'
|
||||
'shipping_firstname'=>'required',
|
||||
'shipping_lastname'=>'required',
|
||||
'shipping_address'=>'required',
|
||||
'shipping_zipcode'=>'required',
|
||||
'shipping_city' => 'required',
|
||||
'shipping_salutation' => 'required'
|
||||
|
||||
]);
|
||||
}
|
||||
$validator = Validator::make(Input::all(), $rules);
|
||||
if ($validator->fails()) {
|
||||
return back()->withErrors($validator)->withErrors($validator)->withInput(Input::all());
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
|
||||
$data = Input::all();
|
||||
//make User
|
||||
$shopping_user = $this->makeShoppingUser($data);
|
||||
//make Order and Items
|
||||
$shopping_order = $this->makeShoppingOrder($shopping_user);
|
||||
|
||||
//check credit Card
|
||||
if(Input::get('payment_method')){
|
||||
$pay = new PayoneController(Input::get('payment_method'));
|
||||
$pay->setPrePayment([]);
|
||||
$cc_ret = [];
|
||||
//need precheck the card
|
||||
if(Input::get('payment_method') == 'cc'){
|
||||
$pay = new PayoneController();
|
||||
$cc_ret = $pay->checkCreditCard($data);
|
||||
if($cc_ret['status'] == 'ERROR' || $cc_ret['status'] == 'INVALID'){
|
||||
/* PaymentTransaction::create([
|
||||
'shopping_payment_id' => //is no shopping_payment_id at this moment,
|
||||
'request' => 'creditcardcheck,
|
||||
'errorcode' => $cc_ret['errorcode'],
|
||||
'errormessage' => $cc_ret['errormessage'],
|
||||
'customermessage' => $cc_ret['customermessage'],
|
||||
'status' => $response['status'],
|
||||
]);*/
|
||||
\Session::flash('cc-error', 1);
|
||||
\Session::flash('errormessage', $cc_ret['errormessage']);
|
||||
\Session::flash('customermessage', $cc_ret['customermessage']);
|
||||
return redirect(route('checkout.checkout_card'))->withInput(Input::all());
|
||||
exit;
|
||||
}
|
||||
if($cc_ret['status'] == 'VALID'){
|
||||
/*
|
||||
* array(4) { ["status"]=> string(5) "VALID" ["pseudocardpan"]=> string(19) "9410010000169020567" ["cardtype"]=> string(1) "V" ["truncatedcardpan"]=> string(16) "411111XXXXXX1111" }
|
||||
* application through http post
|
||||
* get this to the prepayment
|
||||
* */
|
||||
}
|
||||
}
|
||||
|
||||
//other
|
||||
$pay = new PayoneController();
|
||||
$pay->init($shopping_user, $shopping_order);
|
||||
$amount = intval(floatval(Yard::instance('shopping')->totalWithShipping(2, '.', ',')) *100);
|
||||
$reference = $pay->setPrePayment(Input::get('payment_method'), $amount, 'EUR', $cc_ret);
|
||||
$this->putPayments('payment_reference', $reference);
|
||||
$pay->setPersonalData([]);
|
||||
$pay->ResponseData([]);
|
||||
return $pay->ResponseData();
|
||||
}
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
|
||||
public function transactionStatus($status, $reference){
|
||||
|
||||
$shopping_order_id = $this->getPayments('shopping_order_id');
|
||||
|
||||
$ShoppingPayment = ShoppingPayment::where('shopping_order_id', $shopping_order_id)->where('reference', $reference)->first();
|
||||
if(!$ShoppingPayment){
|
||||
//TODO log this
|
||||
\Session::flash('checkout-error', 'Der Zahlungsvorgang konnte nicht abgeschlossen werden, die Zahlung wurde nicht gefunden: '.$reference);
|
||||
return redirect(route('checkout.checkout_card'));
|
||||
}
|
||||
$ShoppingPayment->status = $status;
|
||||
$ShoppingPayment->save();
|
||||
|
||||
if($status == "success"){
|
||||
|
||||
Yard::instance('shopping')->destroy();
|
||||
$this->destroy();
|
||||
|
||||
$payt = $ShoppingPayment->payment_transactions->last();
|
||||
|
||||
$data = [
|
||||
'user_shop' => Util::getUserShop(),
|
||||
'order_reference' => $reference,
|
||||
'pay_trans' => $payt,
|
||||
];
|
||||
return view('web.templates.checkout-final', $data);
|
||||
}
|
||||
if($status == "cancel"){
|
||||
\Session::flash('checkout-error', 'Der Zahlungsvorgang wurde abgebrochen, die Bestellung konnte nicht ausgeführt werden.');
|
||||
return redirect(route('checkout.checkout_card'));
|
||||
|
||||
}
|
||||
if($status == "error"){
|
||||
\Session::flash('checkout-error', 'Der Zahlungsvorgang wurde abgebrochen, die Bestellung konnte nicht ausgeführt werden.');
|
||||
return redirect(route('checkout.checkout_card'));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function transactionApproved($transactionId, $reference) {
|
||||
|
||||
$payt = PaymentTransaction::findOrFail($transactionId);
|
||||
if($payt->shopping_payment->reference != $reference){
|
||||
abort(404);
|
||||
}
|
||||
Yard::instance('shopping')->destroy();
|
||||
$this->destroy();
|
||||
//vor
|
||||
$data = [
|
||||
'user_shop' => Util::getUserShop(),
|
||||
'order_reference' => $payt->shopping_payment->reference,
|
||||
'pay_trans' => $payt,
|
||||
];
|
||||
return view('web.templates.checkout-final', $data);
|
||||
}
|
||||
|
||||
|
||||
public function transactionStatus($check){
|
||||
public function paymentStatus(){
|
||||
|
||||
$data = \Request::all();
|
||||
var_dump($data);
|
||||
$data = \Input::all();
|
||||
var_dump($data);
|
||||
die();
|
||||
if($check == "cancel"){
|
||||
|
||||
\Session::flash('checkout-error', 'Der Zahlungsvorgang wurde abgebrochen, die Bestellung konnte nicht ausgeführt werden.');
|
||||
return $this->checkout();
|
||||
// test para
|
||||
|
||||
$data = [
|
||||
'key' => '698fb2555f8b2efc74f60b2121421f45',
|
||||
'txaction' => 'appointed',
|
||||
'clearingtype' => 'vor',
|
||||
'userid' => '157787236',
|
||||
'txid' => '319655873',
|
||||
'price' => '13.80',
|
||||
'param' => '6', //$this->shopping_order->id,
|
||||
'reference' => '15c76c0d470cf9',
|
||||
];
|
||||
|
||||
if(!isset($data['key']) || !isset($data['param']) || !isset($data['userid']) || !isset($data['txid']) || !isset($data['reference']) || !isset($data['price'])){
|
||||
\Log::channel('payone')->error('PaymentStatus: parameter incomplete: '.json_encode($data));
|
||||
abort(404);
|
||||
}
|
||||
$pay = new PayoneController([]);
|
||||
$pay->checkStatus();
|
||||
|
||||
if($data['key'] != config('payone.defaults.key')) {
|
||||
\Log::channel('payone')->error('PaymentStatus: Key error: '.json_encode($data));
|
||||
abort(404);
|
||||
}
|
||||
|
||||
$shopping_order = ShoppingOrder::find($data['param']);
|
||||
if(!$shopping_order){
|
||||
\Log::channel('payone')->error('PaymentStatus: ShoppingOrder not found: '.json_encode($data));
|
||||
abort(404);
|
||||
}
|
||||
|
||||
$shopping_payment = ShoppingPayment::where('reference', $data['reference'])->first();
|
||||
if(!$shopping_payment){
|
||||
\Log::channel('payone')->error('PaymentStatus: ShoppingPayment not found: '.json_encode($data));
|
||||
abort(404);
|
||||
}
|
||||
|
||||
if($shopping_payment->shopping_order_id != $shopping_order->id){
|
||||
\Log::channel('payone')->error('PaymentStatus: ShoppingPayment no realation ShoppingOrder: '.json_encode($data));
|
||||
abort(404);
|
||||
}
|
||||
|
||||
if($data['key'] != config('payone.defaults.key')) {
|
||||
\Log::channel('payone')->error('PaymentStatus: Key error: '.json_encode($data));
|
||||
abort(404);
|
||||
}
|
||||
|
||||
$price = intval($data['price']*100);
|
||||
if($shopping_payment->amount != $price){
|
||||
\Log::channel('payone')->error('PaymentStatus: Price error: '.json_encode($data));
|
||||
abort(404);
|
||||
}
|
||||
|
||||
//create transaction
|
||||
PaymentTransaction::create([
|
||||
'shopping_payment_id' => $shopping_payment->id,
|
||||
'request' => 'transaction',
|
||||
'txid' => $data['txid'],
|
||||
'userid' => $data['userid'],
|
||||
'status' => 'PAYONE',
|
||||
'key' => $data['key'],
|
||||
'txaction' => $data['txaction'],
|
||||
'transmitted_data' => $data,
|
||||
]);
|
||||
|
||||
$shopping_order->txaction = $data['txaction'];
|
||||
$shopping_order->save();
|
||||
$shopping_payment->txaction = $data['txaction'];
|
||||
$shopping_payment->save();
|
||||
|
||||
|
||||
if($data['txaction'] == 'failed'){
|
||||
|
||||
}
|
||||
if($data['txaction'] == 'paid'){
|
||||
$shopping_order->paid = true;
|
||||
$shopping_order->save();
|
||||
}
|
||||
|
||||
if($data['txaction'] == 'appointed'){
|
||||
|
||||
}
|
||||
$billing_email = $shopping_order->shopping_user->billing_email;
|
||||
$user_shop_email = $shopping_order->user_shop->user->email;
|
||||
if(!$billing_email){
|
||||
$billing_email = config('app.checkout_mail');
|
||||
}
|
||||
$checkout_mail = config('app.checkout_mail');
|
||||
if($user_shop_email){
|
||||
Mail::to($billing_email)->bcc([$user_shop_email, $checkout_mail])->send(new MailCheckout($data['txaction'], $shopping_order, $shopping_payment));
|
||||
}else{
|
||||
Mail::to($billing_email)->bcc($checkout_mail)->send(new MailCheckout($data['txaction'], $shopping_order, $shopping_payment));
|
||||
}
|
||||
die("ok");
|
||||
}
|
||||
|
||||
public function removeCard($rowId){
|
||||
Yard::instance('shopping')->remove($rowId);
|
||||
return back();
|
||||
private function makeShoppingUser($data){
|
||||
|
||||
$data['same_as_billing'] = isset($data['same_as_billing']) ? true : false;
|
||||
$data['accepted_data_checkbox'] = isset($data['accepted_data_checkbox']) ? true : false;
|
||||
|
||||
$shopping_user = false;
|
||||
if($this->getPayments('shopping_user_id')){
|
||||
$shopping_user = ShoppingUser::find($this->getPayments('shopping_user_id'));
|
||||
if($shopping_user){
|
||||
$shopping_user->fill($data);
|
||||
$shopping_user->save();
|
||||
}
|
||||
}
|
||||
if(!$shopping_user){
|
||||
$shopping_user = ShoppingUser::create($data);
|
||||
}
|
||||
$this->putPayments('shopping_user_id', $shopping_user->id);
|
||||
|
||||
return $shopping_user;
|
||||
}
|
||||
|
||||
public function deleteCard(){
|
||||
private function makeShoppingOrder($shopping_user){
|
||||
|
||||
Yard::instance('shopping')->destroy();
|
||||
return back();
|
||||
|
||||
$user_shop = Util::getUserShop();
|
||||
|
||||
$data = [
|
||||
'shopping_user_id' => $shopping_user->id,
|
||||
'country_id' => Yard::instance('shopping')->getShippingCountryId(),
|
||||
'user_shop_id' => $user_shop->id,
|
||||
'total' => Yard::instance('shopping')->total(2, '.', ','),
|
||||
'shipping' => Yard::instance('shopping')->shipping(2, '.', ','),
|
||||
'subtotal' => Yard::instance('shopping')->subtotalWithShipping(2, '.', ','),
|
||||
'tax_rate' => Yard::getTaxRate(),
|
||||
'tax' => Yard::instance('shopping')->subtotalWithShipping(2, '.', ','),
|
||||
'total_shipping' => Yard::instance('shopping')->totalWithShipping(2, '.', ','),
|
||||
'weight' => Yard::instance('shopping')->weight(),
|
||||
];
|
||||
$shopping_order= false;
|
||||
if($this->getPayments('shopping_order_id')){
|
||||
$shopping_order = ShoppingOrder::find($this->getPayments('shopping_order_id'));
|
||||
if($shopping_order){
|
||||
$shopping_order->fill($data);
|
||||
$shopping_order->save();
|
||||
}
|
||||
}
|
||||
if(!$shopping_order){
|
||||
$shopping_order = ShoppingOrder::create($data);
|
||||
}
|
||||
$this->putPayments('shopping_order_id', $shopping_order->id);
|
||||
|
||||
|
||||
$items = Yard::instance('shopping')->content();
|
||||
|
||||
|
||||
$shopping_order->shopping_order_items()->each(function($model) use ($items, $shopping_order) {
|
||||
foreach ($items as $item) {
|
||||
if ($model->row_id === $item->rowId) {
|
||||
$model->fill([
|
||||
'shopping_order_id' => $shopping_order->id,
|
||||
'row_id' => $item->rowId,
|
||||
'product_id' => $item->id,
|
||||
'qty' => $item->qty,
|
||||
'price' => $item->price,
|
||||
'slug' => $item->options->slug,
|
||||
])->save();
|
||||
return;
|
||||
}
|
||||
}
|
||||
return $model->delete();
|
||||
});
|
||||
|
||||
foreach ($items as $item) {
|
||||
if (!ShoppingOrderItem::where('shopping_order_id', $shopping_order->id)->where('row_id', $item->rowId)->count())
|
||||
ShoppingOrderItem::create([
|
||||
'shopping_order_id' => $shopping_order->id,
|
||||
'row_id' => $item->rowId,
|
||||
'product_id' => $item->id,
|
||||
'qty' => $item->qty,
|
||||
'price' => $item->price,
|
||||
'slug' => $item->options->slug
|
||||
]);
|
||||
};
|
||||
|
||||
return $shopping_order;
|
||||
}
|
||||
|
||||
private function putPayments($key, $value){
|
||||
$content = $this->getContent();
|
||||
$content->put($key, $value);
|
||||
$this->session->put($this->instance, $content);
|
||||
|
||||
}
|
||||
private function getPayments($key){
|
||||
$content = $this->getContent();
|
||||
if ($content->has($key)){
|
||||
return $content->get($key);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
private function getContent()
|
||||
{
|
||||
if (is_null($this->session->get($this->instance))) {
|
||||
return new Collection([]);
|
||||
}
|
||||
return $this->session->get($this->instance);
|
||||
}
|
||||
|
||||
|
||||
public function destroy()
|
||||
{
|
||||
$this->session->remove($this->instance);
|
||||
}
|
||||
|
||||
}
|
||||
69
app/Mail/MailCheckout.php
Normal file
69
app/Mail/MailCheckout.php
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<?php
|
||||
namespace App\Mail;
|
||||
|
||||
use App\User;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use App\Services\Util;
|
||||
|
||||
class MailCheckout extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
public $txaction;
|
||||
public $shopping_order;
|
||||
public $shopping_payment;
|
||||
|
||||
public $subject;
|
||||
public $data;
|
||||
|
||||
|
||||
public function __construct($txaction, $shopping_order, $shopping_payment)
|
||||
{
|
||||
$this->txaction = $txaction;
|
||||
$this->shopping_order = $shopping_order;
|
||||
$this->shopping_payment = $shopping_payment;
|
||||
|
||||
$this->subject = __('Deine Bestellung auf mivita.care');
|
||||
if($shopping_order->user_shop){
|
||||
$this->subject = __('Deine Bestellung auf '.$shopping_order->user_shop->slug.'.mivita.care');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function build()
|
||||
{
|
||||
$salutation = __('Dear customer').",";
|
||||
|
||||
if($this->shopping_order->shopping_user){
|
||||
$salutation = __('Hallo')." ".$this->shopping_order->shopping_user->billing_firstname." ".$this->shopping_order->shopping_user->billing_lastname.",";
|
||||
//make Adresse
|
||||
|
||||
}
|
||||
if($this->txaction == 'paid'){
|
||||
return $this->view('emails.checkout')->with([
|
||||
'salutation' => $salutation,
|
||||
'copy1line' => __('vielen Dank für Deine Bestellung bei mivita.care.<br><br>Nachfolgend haben wir zur Kontrolle Deine Bestellung noch einmal aufgelistet.'),
|
||||
'shopping_order' => $this->shopping_order,
|
||||
'shopping_payment' => $this->shopping_payment,
|
||||
'copy3line' => __('Bei Fragen sind wir jederzeit für Dich da.'),
|
||||
'greetings' => __('Best regards'),
|
||||
'sender' => __('your mivita.care team'),
|
||||
]);
|
||||
}else{
|
||||
return $this->view('emails.checkout_status')->with([
|
||||
'salutation' => $salutation,
|
||||
'copy1line' => "Status zu Deiner Bestellung bei mivita.care",
|
||||
'txactionn' => $this->txaction,
|
||||
'shopping_order' => $this->shopping_order,
|
||||
'shopping_payment' => $this->shopping_payment,
|
||||
'copy3line' => __('Bei Fragen sind wir jederzeit für Dich da.'),
|
||||
'greetings' => __('Best regards'),
|
||||
'sender' => __('your mivita.care team'),
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -6,5 +6,30 @@ use Illuminate\Database\Eloquent\Model;
|
|||
|
||||
class PaymentTransaction extends Model
|
||||
{
|
||||
//
|
||||
protected $table = 'payment_transactions';
|
||||
|
||||
|
||||
protected $casts = [
|
||||
'transmitted_data' => 'array'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'shopping_payment_id',
|
||||
'request',
|
||||
'txid',
|
||||
'userid',
|
||||
'status',
|
||||
'key',
|
||||
'txaction',
|
||||
'transmitted_data',
|
||||
'errorcode',
|
||||
'errormessage',
|
||||
'customermessage',
|
||||
];
|
||||
|
||||
|
||||
public function shopping_payment()
|
||||
{
|
||||
return $this->belongsTo('App\Models\ShoppingPayment','shopping_payment_id');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,5 +6,77 @@ use Illuminate\Database\Eloquent\Model;
|
|||
|
||||
class ShoppingOrder extends Model
|
||||
{
|
||||
//
|
||||
protected $table = 'shopping_orders';
|
||||
|
||||
protected $fillable = [
|
||||
'shopping_user_id',
|
||||
'country_id',
|
||||
'user_shop_id',
|
||||
'total',
|
||||
'shipping',
|
||||
'subtotal',
|
||||
'tax_rate',
|
||||
'tax',
|
||||
'total_shipping',
|
||||
'weight',
|
||||
];
|
||||
|
||||
|
||||
public function shopping_user()
|
||||
{
|
||||
return $this->belongsTo('App\Models\ShoppingUser','shopping_user_id');
|
||||
}
|
||||
|
||||
public function country()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Country','country_id');
|
||||
}
|
||||
|
||||
public function user_shop()
|
||||
{
|
||||
return $this->belongsTo('App\Models\UserShop','user_shop_id');
|
||||
}
|
||||
|
||||
public function shopping_order_items(){
|
||||
return $this->hasMany('App\Models\ShoppingOrderItem', 'shopping_order_id');
|
||||
}
|
||||
|
||||
public function shopping_payments(){
|
||||
return $this->hasMany('App\Models\ShoppingPayment', 'shopping_order_id');
|
||||
}
|
||||
|
||||
|
||||
public function _format_number($value)
|
||||
{
|
||||
return preg_replace("/[^0-9,]/", "", $value);
|
||||
}
|
||||
|
||||
|
||||
public function getFormattedShipping()
|
||||
{
|
||||
if (\App::getLocale() == "en") {
|
||||
return number_format($this->attributes['shipping'], 2, '.', ',');
|
||||
}
|
||||
return number_format($this->attributes['shipping'], 2, ',', '.');
|
||||
}
|
||||
|
||||
public function getFormattedTotalShipping()
|
||||
{
|
||||
if (\App::getLocale() == "en") {
|
||||
return number_format($this->attributes['total_shipping'], 2, '.', ',');
|
||||
}
|
||||
return number_format($this->attributes['total_shipping'], 2, ',', '.');
|
||||
}
|
||||
|
||||
|
||||
public function getFormattedPrice()
|
||||
{
|
||||
if (\App::getLocale() == "en") {
|
||||
return number_format($this->attributes['price'], 2, '.', ',');
|
||||
}
|
||||
return number_format($this->attributes['price'], 2, ',', '.');
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,5 +6,34 @@ use Illuminate\Database\Eloquent\Model;
|
|||
|
||||
class ShoppingOrderItem extends Model
|
||||
{
|
||||
//
|
||||
}
|
||||
protected $table = 'shopping_order_items';
|
||||
|
||||
protected $fillable = [
|
||||
'shopping_order_id',
|
||||
'row_id',
|
||||
'product_id',
|
||||
'qty',
|
||||
'price',
|
||||
'slug',
|
||||
];
|
||||
|
||||
|
||||
public function shopping_order()
|
||||
{
|
||||
return $this->belongsTo('App\Models\ShoppingOrder','shopping_order_id');
|
||||
}
|
||||
|
||||
public function product()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Product','product_id');
|
||||
}
|
||||
|
||||
public function getFormattedPrice()
|
||||
{
|
||||
if (\App::getLocale() == "en") {
|
||||
return number_format($this->attributes['price'], 2, '.', ',');
|
||||
}
|
||||
return number_format($this->attributes['price'], 2, ',', '.');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -6,5 +6,47 @@ use Illuminate\Database\Eloquent\Model;
|
|||
|
||||
class ShoppingPayment extends Model
|
||||
{
|
||||
//
|
||||
}
|
||||
protected $table = 'shopping_payments';
|
||||
|
||||
protected $fillable = [
|
||||
'shopping_order_id',
|
||||
'clearingtype',
|
||||
'wallettype',
|
||||
'onlinebanktransfertype',
|
||||
'reference',
|
||||
'amount',
|
||||
'currency',
|
||||
];
|
||||
|
||||
|
||||
public function shopping_order()
|
||||
{
|
||||
return $this->belongsTo('App\Models\ShoppingOrder','shopping_order_id');
|
||||
}
|
||||
|
||||
public function payment_transactions()
|
||||
{
|
||||
return $this->hasMany('App\Models\PaymentTransaction','shopping_payment_id');
|
||||
}
|
||||
|
||||
public function getPaymentType(){
|
||||
|
||||
if($this->clearingtype == 'wlt') {
|
||||
if ($this->wallettype == 'PPE') {
|
||||
return 'PayPal';
|
||||
}
|
||||
}
|
||||
if($this->clearingtype == 'cc') {
|
||||
return 'Kreditkarte';
|
||||
}
|
||||
if($this->clearingtype == 'vor') {
|
||||
return 'Vorkasse';
|
||||
}
|
||||
if($this->clearingtype == 'sb') {
|
||||
if ($this->onlinebanktransfertype == 'PNT') {
|
||||
return 'Sofort Überweisung';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -6,5 +6,49 @@ use Illuminate\Database\Eloquent\Model;
|
|||
|
||||
class ShoppingUser extends Model
|
||||
{
|
||||
//
|
||||
}
|
||||
protected $table = 'shopping_users';
|
||||
|
||||
protected $fillable = [
|
||||
'billing_salutation',
|
||||
'billing_company',
|
||||
'billing_firstname',
|
||||
'billing_lastname',
|
||||
'billing_address',
|
||||
'billing_address_2',
|
||||
'billing_zipcode',
|
||||
'billing_city',
|
||||
'billing_country_id',
|
||||
'billing_phone',
|
||||
'billing_email',
|
||||
'accepted_data_checkbox',
|
||||
'same_as_billing',
|
||||
'shipping_salutation',
|
||||
'shipping_company',
|
||||
'shipping_firstname',
|
||||
'shipping_lastname',
|
||||
'shipping_address',
|
||||
'shipping_address_2',
|
||||
'shipping_zipcode',
|
||||
'shipping_city',
|
||||
'shipping_country_id',
|
||||
'shipping_phone',
|
||||
];
|
||||
|
||||
|
||||
|
||||
public function billing_country()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Country','billing_country_id');
|
||||
}
|
||||
|
||||
public function shipping_country()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Country','shipping_country_id');
|
||||
}
|
||||
|
||||
public function Shopping_orders()
|
||||
{
|
||||
return $this->hasMany('App\Models\ShoppingOrder','shopping_user_id');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -73,7 +73,17 @@ class Util
|
|||
return false;
|
||||
}
|
||||
|
||||
public static function getUserShopBackUrl($uri){
|
||||
public static function getUserShopBackUrl(){
|
||||
|
||||
if(\Session::has('user_shop')){
|
||||
if($user_shop = \Session::get('user_shop')){
|
||||
return 'http://'.$user_shop->slug.".".Config('app.domain')."/back/to/shop";
|
||||
}
|
||||
}
|
||||
return url("/");
|
||||
}
|
||||
|
||||
public static function getUserCardBackUrl($uri){
|
||||
|
||||
if(\Session::has('user_shop')){
|
||||
if($user_shop = \Session::get('user_shop')){
|
||||
|
|
|
|||
|
|
@ -226,6 +226,13 @@ class Yard extends Cart
|
|||
return $this->numberFormat($subTotal, $decimals, $decimalPoint, $thousandSeperator);
|
||||
}
|
||||
|
||||
public function destroy()
|
||||
{
|
||||
$this->ysession->remove($this->yinstance);
|
||||
parent::destroy();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the Formated number
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ return [
|
|||
'pre_url_main' => env('APP_URL_MAIN', ''),
|
||||
'pre_url_crm' => env('APP_URL_CRM', 'mein.'),
|
||||
'checkout_url' => env('APP_URL_CHECKOUT', 'checkout.'),
|
||||
'checkout_mail' => env('APP_CHECKOUT_MAIL', 'k.adametz@kagado.de'),
|
||||
|
||||
|
||||
/* 'url_backend' => env('APP_URL', 'http://mivita.local/'),
|
||||
|
|
|
|||
|
|
@ -33,6 +33,11 @@ return [
|
|||
*/
|
||||
|
||||
'channels' => [
|
||||
|
||||
'payone' => [
|
||||
'driver' => 'single',
|
||||
'path' => storage_path('logs/payone.log'),
|
||||
],
|
||||
'stack' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single'],
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ return [
|
|||
|
||||
'from' => [
|
||||
'address' => env('MAIL_FROM_ADDRESS', 'support@mivita.care'),
|
||||
'name' => env('MAIL_FROM_NAME', 'Support at mivita.care'),
|
||||
'name' => env('MAIL_FROM_NAME', 'mivita.care'),
|
||||
],
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -28,6 +28,9 @@ class CreateShoppingUsersTable extends Migration
|
|||
$table->string('billing_phone')->nullable();
|
||||
$table->string('billing_email')->nullable();
|
||||
|
||||
|
||||
$table->boolean('accepted_data_checkbox')->default(false);
|
||||
|
||||
$table->boolean('same_as_billing')->default(true);
|
||||
|
||||
$table->char('shipping_salutation', 2)->nullable();
|
||||
|
|
|
|||
|
|
@ -29,6 +29,10 @@ class CreateShoppingOrdersTable extends Migration
|
|||
|
||||
$table->unsignedInteger('weight')->nullable();
|
||||
|
||||
$table->boolean('paid')->default(false);
|
||||
$table->string('txaction', 20)->nullable()->index();
|
||||
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('shopping_user_id')
|
||||
|
|
|
|||
|
|
@ -17,12 +17,12 @@ class CreateShoppingOrderItemsTable extends Migration
|
|||
$table->increments('id');
|
||||
|
||||
$table->unsignedInteger('shopping_order_id');
|
||||
$table->string('row_id', 40)->nullable();
|
||||
$table->unsignedInteger('product_id');
|
||||
$table->unsignedInteger('qty');
|
||||
$table->decimal('price', 8, 2)->nullable();
|
||||
$table->string('slug')->nullable();
|
||||
|
||||
$table->boolean('paid')->default(false);
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('shopping_order_id')
|
||||
|
|
|
|||
|
|
@ -22,10 +22,12 @@ class CreateShoppingPaymentsTable extends Migration
|
|||
$table->string('wallettype', 3)->nullable();
|
||||
$table->string('onlinebanktransfertype',3)->nullable();
|
||||
|
||||
$table->string('reference', 20);
|
||||
$table->string('reference', 16);
|
||||
$table->unsignedInteger('amount');
|
||||
$table->string('currency', 6);
|
||||
|
||||
$table->string('status', 10)->nullable()->index();
|
||||
$table->string('txaction', 20)->nullable()->index();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
|
|
|
|||
|
|
@ -22,17 +22,17 @@ class CreatePaymentTransactionsTable extends Migration
|
|||
$table->unsignedInteger('txid');
|
||||
$table->unsignedInteger('userid');
|
||||
|
||||
$table->string('status',20)->nullable();;
|
||||
$table->string('status',20)->nullable();
|
||||
|
||||
|
||||
$table->string('key',40)->nullable();;
|
||||
$table->string('txaction',20)->nullable();;
|
||||
$table->string('key',40)->nullable();
|
||||
$table->string('txaction',20)->nullable();
|
||||
|
||||
$table->text('transmitted_data')->nullable();;
|
||||
$table->text('transmitted_data')->nullable();
|
||||
|
||||
$table->unsignedInteger('errorcode')->nullable();;
|
||||
$table->string('errormessage')->nullable();;
|
||||
$table->string('customermessage')->nullable();;
|
||||
$table->unsignedInteger('errorcode')->nullable();
|
||||
$table->string('errormessage')->nullable();
|
||||
$table->string('customermessage')->nullable();
|
||||
|
||||
|
||||
$table->timestamps();
|
||||
|
|
|
|||
BIN
public/images/payments-assets/creditcard.png
Normal file
BIN
public/images/payments-assets/creditcard.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
public/images/payments-assets/paypal.png
Normal file
BIN
public/images/payments-assets/paypal.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
BIN
public/images/payments-assets/sofort.png
Normal file
BIN
public/images/payments-assets/sofort.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.9 KiB |
BIN
public/images/payments-assets/vor.png
Normal file
BIN
public/images/payments-assets/vor.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
BIN
public/images/payments.psd
Normal file
BIN
public/images/payments.psd
Normal file
Binary file not shown.
|
|
@ -180,18 +180,20 @@ return [
|
|||
'user_shop_active' => 'Nutzungsbedinungen',
|
||||
'g-recaptcha-response' => 'google reCaptcha',
|
||||
'accepted_data_protection' => 'Einwilligung Datenschutzerklärung',
|
||||
'billing.firstname'=>'Vorname',
|
||||
'billing.lastname'=>'Nachname',
|
||||
'billing.email'=>'E-Mail-Adresse',
|
||||
'billing.address'=>'Adresse',
|
||||
'billing.zipcode'=>'PLZ',
|
||||
'billing.city' => 'Stadt',
|
||||
'billing_salutation' => 'Anrede',
|
||||
'billing_firstname'=>'Vorname',
|
||||
'billing_lastname'=>'Nachname',
|
||||
'billing_email'=>'E-Mail-Adresse',
|
||||
'billing_address'=>'Adresse',
|
||||
'billing_zipcode'=>'PLZ',
|
||||
'billing_city' => 'Stadt',
|
||||
'accepted_data_checkbox' => 'Einwilligung',
|
||||
'shipping.firstname'=>'Vorname',
|
||||
'shipping.lastname'=>'Nachname',
|
||||
'shipping.address'=>'Adresse',
|
||||
'shipping.zipcode'=>'PLZ',
|
||||
'shipping.city' => 'Stadt'
|
||||
'shipping_salutation' => 'Anrede',
|
||||
'shipping_firstname'=>'Vorname',
|
||||
'shipping_lastname'=>'Nachname',
|
||||
'shipping_address'=>'Adresse',
|
||||
'shipping_zipcode'=>'PLZ',
|
||||
'shipping_city' => 'Stadt'
|
||||
|
||||
],
|
||||
];
|
||||
|
|
|
|||
392
resources/views/emails/checkout.blade.php
Normal file
392
resources/views/emails/checkout.blade.php
Normal file
|
|
@ -0,0 +1,392 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mivita.care</title>
|
||||
|
||||
<style type="text/css">
|
||||
@import url(https://fonts.googleapis.com/css?family=Roboto);
|
||||
img {
|
||||
max-width: 600px;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
-ms-interpolation-mode: bicubic;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
border: 0;
|
||||
outline: none;
|
||||
color: #919f7a;
|
||||
}
|
||||
a:hover {
|
||||
color: #b6b600;
|
||||
}
|
||||
a img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
td, h1, h2, h3 {
|
||||
font-family: "Roboto", Helvetica, Arial, sans-serif;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
body {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-size-adjust: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: #37302d;
|
||||
background: #ffffff;
|
||||
font-size: 15px;
|
||||
line-height: 26px
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: separate !important;
|
||||
}
|
||||
|
||||
.headline {
|
||||
color: #37302d;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.sub_headline {
|
||||
color: #788662;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.force-full-width {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: none;
|
||||
border-top: 1px solid #b7c59e;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<style type="text/css" media="screen">
|
||||
@media screen {
|
||||
/*Thanks Outlook 2013! http://goo.gl/XLxpyl*/
|
||||
td, h1, h2, h3 {
|
||||
font-family: 'Roboto', 'Helvetica Neue', 'Arial', 'sans-serif' !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style type="text/css" media="only screen and (max-width: 480px)">
|
||||
/* Mobile styles */
|
||||
@media only screen and (max-width: 480px) {
|
||||
|
||||
table[class="w320"] {
|
||||
width: 320px !important;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
<!--[if mso]>
|
||||
<style type="text/css">
|
||||
body, table, td {
|
||||
font-family: Helvetica, Arial, sans-serif !important;
|
||||
}
|
||||
</style>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
</head>
|
||||
<body class="body" style="padding:0; margin:0; display:block; background:#f8f8f8; -webkit-text-size-adjust:none" bgcolor="#f8f8f8">
|
||||
|
||||
<div style="display: none; mso-hide: all; width: 0px; height: 0px; max-width: 0px; max-height: 0px; font-size: 0px; line-height: 0px;">
|
||||
{{ $copy1line }}
|
||||
</div>
|
||||
|
||||
<table align="left" cellpadding="0" cellspacing="0" width="100%" height="100%">
|
||||
<tr>
|
||||
<td align="left" valign="top" bgcolor="#f8f8f8" width="100%">
|
||||
<br>
|
||||
<table style="margin: 0 auto;" cellpadding="0" cellspacing="0" width="700" class="w320">
|
||||
<tr>
|
||||
<td align="left" valign="top">
|
||||
<table style="margin: 0 auto;" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td style=" text-align:center;">
|
||||
<center>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" class="">
|
||||
<tbody class="">
|
||||
<tr class="">
|
||||
<td align="center" valign="middle" style="font-size: 0px;" class="">
|
||||
<center>
|
||||
<picture style="text-align: center">
|
||||
<img src="https://mein.mivita.care/images/logo_mivita.png" alt="mivita.care" style="border:none" width="230">
|
||||
</picture>
|
||||
</center>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding="10" style="padding: 10px;" cellspacing="0" border="0" width="100%" bgcolor="#ffffff">
|
||||
<tr>
|
||||
<td class="headline">
|
||||
<b>{{ $salutation }} </b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color:#37302d;">
|
||||
{!! nl2br($copy1line) !!}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="sub_headline">
|
||||
<hr><br>
|
||||
<b> Du hast folgende Artikel bestellt:</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="padding: 20px; border:1px solid #eee; background-color: #f6fdf5" cellpadding="2" cellspacing="0" width="100%">
|
||||
@foreach($shopping_order->shopping_order_items as $shopping_order_item)
|
||||
<tr>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top; width: 10%; " >
|
||||
{{ $shopping_order_item->qty }} x
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top;">
|
||||
{{ $shopping_order_item->product->name }}
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top;">
|
||||
{{ $shopping_order_item->getFormattedPrice() }} EUR
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top;">
|
||||
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top;">
|
||||
Verpackungs- u. Versandkosten
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top;">
|
||||
{{ $shopping_order->getFormattedShipping() }} EUR
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top;">
|
||||
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top;">
|
||||
<b>Gesamtpreis</b>
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top;">
|
||||
<b>{{ $shopping_order->getFormattedTotalShipping() }} EUR</b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sub_headline">
|
||||
<b>Zahlungsinfo:</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="padding: 20px; border:1px solid #eee; background-color: #f6fdf5" cellpadding="2" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<b> Zahlung ist bestätigt!</b><br>
|
||||
Zahlung mit: {{$shopping_payment->getPaymentType()}}<br>
|
||||
Zahlungsreferenz: {{$shopping_payment->reference}}<br>
|
||||
Deine E-Mai: {{ $shopping_order->shopping_user->billing_email }}<br>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sub_headline">
|
||||
<b>Deine Rechnungsadresse:</b>
|
||||
</td>
|
||||
<tr>
|
||||
<td style="color:#37302d; ">
|
||||
|
||||
<table style="padding: 20px; border:1px solid #eee; background-color: #f6fdf5" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td style="color:#37302d;">
|
||||
@if($shopping_order->shopping_user->billing_company)
|
||||
{{ $shopping_order->shopping_user->billing_company }}<br>
|
||||
@endif
|
||||
|
||||
{{ $shopping_order->shopping_user->billing_firstname }}
|
||||
{{ $shopping_order->shopping_user->billing_lastname }} <br>
|
||||
<br>
|
||||
|
||||
{{ $shopping_order->shopping_user->billing_address }} <br>
|
||||
@if($shopping_order->shopping_user->billing_address_2)
|
||||
{{ $shopping_order->shopping_user->billing_address_2 }}<br>
|
||||
@endif
|
||||
|
||||
{{ $shopping_order->shopping_user->billing_zipcode }}
|
||||
{{ $shopping_order->shopping_user->billing_city }} <br>
|
||||
{{ $shopping_order->shopping_user->billing_country->getLocated() }} <br>
|
||||
|
||||
@if($shopping_order->shopping_user->billing_phone)
|
||||
<br><br> {{ $shopping_order->shopping_user->billing_phone }}<br>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="sub_headline">
|
||||
<b>Deine Lieferadresse:</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color:#37302d;">
|
||||
<table style="padding: 20px; border:1px solid #eee; background-color: #f6fdf5" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td style="color:#37302d;">
|
||||
@if($shopping_order->shopping_user->same_as_billing)
|
||||
Lieferadresse ist gleich Rechnungsadresse
|
||||
@else
|
||||
|
||||
@if($shopping_order->shopping_user->shipping_company)
|
||||
{{ $shopping_order->shopping_user->shipping_company }}<br>
|
||||
@endif
|
||||
|
||||
{{ $shopping_order->shopping_user->shipping_firstname }}
|
||||
{{ $shopping_order->shopping_user->shipping_lastname }} <br>
|
||||
<br>
|
||||
|
||||
{{ $shopping_order->shopping_user->shipping_address }} <br>
|
||||
@if($shopping_order->shopping_user->shipping_address_2)
|
||||
{{ $shopping_order->shopping_user->shipping_address_2 }}<br>
|
||||
@endif
|
||||
|
||||
{{ $shopping_order->shopping_user->shipping_zipcode }}
|
||||
{{ $shopping_order->shopping_user->shipping_city }} <br>
|
||||
|
||||
{{ $shopping_order->shopping_user->shipping_country->getLocated() }} <br>
|
||||
|
||||
|
||||
@if($shopping_order->shopping_user->shipping_phone)
|
||||
<br><br> {{ $shopping_order->shopping_user->shipping_phone }}<br>
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color:#37302d;font-size: 14px;">
|
||||
<table style="margin: 0 auto;" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td style="color:#37302d;">
|
||||
{{ $copy3line }}
|
||||
<br>
|
||||
|
||||
@if($shopping_order->user_shop)
|
||||
@if($shopping_order->user_shop->title)
|
||||
<b>{{ $shopping_order->user_shop->title }}</b><br>
|
||||
@endif
|
||||
@if($shopping_order->user_shop->contact)
|
||||
{!! nl2br($shopping_order->user_shop->contact) !!}<br>
|
||||
@endif
|
||||
<a href="{{ $shopping_order->user_shop->getSubdomain() }}">{{ $shopping_order->user_shop->getSubdomain() }}</a>
|
||||
|
||||
@endif
|
||||
|
||||
|
||||
<hr><br>
|
||||
{{ $greetings }} <br><b>{{ $sender }}</b>
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="margin: 0 auto;" cellpadding="0" cellspacing="0" class="force-full-width"
|
||||
bgcolor="#f8f8f8">
|
||||
<tr>
|
||||
<td style="color:#7B7B7E; font-size:12px; line-height: 16px; text-align: center">
|
||||
<p>
|
||||
mivita e.K. | Leinfeld 2 | 87755 Kirchhaslach<br>
|
||||
Telefon: +49 (0) 8333 946 98 90 | Fax: +49 (0) 8333 7268<br>
|
||||
E-Mail: info@mivita.care<br></p>
|
||||
<a href="https://www.mivita.care" style="color: #7B7B7E; text-decoration: underline;">www.mivita.care</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color:#bbbbbb; font-size:12px; line-height: 16px; text-align: center">
|
||||
<p>Geschäftsinhaber: Alois Ried | Registergericht: Memmingen<br>
|
||||
Registernummer: HRA 12236 | USt-ID-Nr.: DE 244162340</p>
|
||||
|
||||
<a href="{{ Util::getUserCardBackUrl('/datenschutz') }}">Datenschutzerklärung</a><br>
|
||||
<a href="{{ Util::getUserCardBackUrl('/impressum') }}">Impressum</a><br>
|
||||
|
||||
© 2019 All Rights Reserved<br>
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
419
resources/views/emails/checkout_status.blade.php
Normal file
419
resources/views/emails/checkout_status.blade.php
Normal file
|
|
@ -0,0 +1,419 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>mivita.care</title>
|
||||
|
||||
<style type="text/css">
|
||||
@import url(https://fonts.googleapis.com/css?family=Roboto);
|
||||
img {
|
||||
max-width: 600px;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
-ms-interpolation-mode: bicubic;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
border: 0;
|
||||
outline: none;
|
||||
color: #919f7a;
|
||||
}
|
||||
a:hover {
|
||||
color: #b6b600;
|
||||
}
|
||||
a img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
td, h1, h2, h3 {
|
||||
font-family: "Roboto", Helvetica, Arial, sans-serif;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
body {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-size-adjust: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: #37302d;
|
||||
background: #ffffff;
|
||||
font-size: 15px;
|
||||
line-height: 26px
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: separate !important;
|
||||
}
|
||||
|
||||
.headline {
|
||||
color: #37302d;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.sub_headline {
|
||||
color: #788662;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.force-full-width {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: none;
|
||||
border-top: 1px solid #b7c59e;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<style type="text/css" media="screen">
|
||||
@media screen {
|
||||
/*Thanks Outlook 2013! http://goo.gl/XLxpyl*/
|
||||
td, h1, h2, h3 {
|
||||
font-family: 'Roboto', 'Helvetica Neue', 'Arial', 'sans-serif' !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style type="text/css" media="only screen and (max-width: 480px)">
|
||||
/* Mobile styles */
|
||||
@media only screen and (max-width: 480px) {
|
||||
|
||||
table[class="w320"] {
|
||||
width: 320px !important;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
<!--[if mso]>
|
||||
<style type="text/css">
|
||||
body, table, td {
|
||||
font-family: Helvetica, Arial, sans-serif !important;
|
||||
}
|
||||
</style>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
</head>
|
||||
<body class="body" style="padding:0; margin:0; display:block; background:#f8f8f8; -webkit-text-size-adjust:none" bgcolor="#f8f8f8">
|
||||
|
||||
<div style="display: none; mso-hide: all; width: 0px; height: 0px; max-width: 0px; max-height: 0px; font-size: 0px; line-height: 0px;">
|
||||
{{ $copy1line }}
|
||||
</div>
|
||||
|
||||
<table align="left" cellpadding="0" cellspacing="0" width="100%" height="100%">
|
||||
<tr>
|
||||
<td align="left" valign="top" bgcolor="#f8f8f8" width="100%">
|
||||
<br>
|
||||
<table style="margin: 0 auto;" cellpadding="0" cellspacing="0" width="700" class="w320">
|
||||
<tr>
|
||||
<td align="left" valign="top">
|
||||
<table style="margin: 0 auto;" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td style=" text-align:center;">
|
||||
<center>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" class="">
|
||||
<tbody class="">
|
||||
<tr class="">
|
||||
<td align="center" valign="middle" style="font-size: 0px;" class="">
|
||||
<center>
|
||||
<picture style="text-align: center">
|
||||
<img src="https://mein.mivita.care/images/logo_mivita.png" alt="mivita.care" style="border:none" width="230">
|
||||
</picture>
|
||||
</center>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding="10" style="padding: 10px;" cellspacing="0" border="0" width="100%" bgcolor="#ffffff">
|
||||
<tr>
|
||||
<td class="headline">
|
||||
<b>{{ $salutation }} </b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color:#37302d;">
|
||||
{!! nl2br($copy1line) !!}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="sub_headline">
|
||||
<b>Statusinfo:</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="padding: 20px; border:1px solid #eee; background-color: #f6fdf5" cellpadding="2" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
@if($txaction == 'failed')
|
||||
<b> Die Zahlung ist fehlgeschlagen!</b><br>
|
||||
@elseif($txaction == 'appointed')
|
||||
|
||||
@if($shopping_payment->clearingtype == "vor")
|
||||
<b>Bezahlung per Vorkasse:</b><br>
|
||||
Bitte überweise {{ number_format( floatval($shopping_payment->amount/100), 2, ",", ".") }} EUR auf die folgende Kontoverbindung, um den Kauf abzuschließen.<br>
|
||||
<p>
|
||||
@php($pay_trans = $shopping_payment->payment_transactions->where('request', 'preauthorization')->last())
|
||||
|
||||
|
||||
<b>Kontoinhaber:</b> {{ $pay_trans->transmitted_data['clearing_bankaccountholder'] }} <br>
|
||||
<b>IBAN:</b> {{ $pay_trans->transmitted_data['clearing_bankiban'] }} <br>
|
||||
<b>BIC:</b> {{ $pay_trans->transmitted_data['clearing_bankbic'] }} <br>
|
||||
<b>Bank:</b> {{ $pay_trans->transmitted_data['clearing_bankname'] }} <br>
|
||||
<b>Gesamtbetrag:</b> {{ number_format( floatval($pay_trans->shopping_payment->amount/100), 2, ",", ".") }} EUR<br>
|
||||
<b>Verwendungszweck:</b> {{ $pay_trans->transmitted_data['clearing_bankcode'] }}
|
||||
</p>
|
||||
<hr />
|
||||
@else
|
||||
<b>Deine Zahlung wurde genehmigt, eine Bestätigung der Zahlung wird automatisch erstellt.</b><br>
|
||||
@endif
|
||||
@else
|
||||
<b> SystemStatus: {{$txaction}}</b><br>
|
||||
|
||||
@endif
|
||||
|
||||
Zahlung mit: {{$shopping_payment->getPaymentType()}}<br>
|
||||
Zahlungsreferenz: {{$shopping_payment->reference}}<br>
|
||||
Deine E-Mai: {{ $shopping_order->shopping_user->billing_email }}<br>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="sub_headline">
|
||||
<hr><br>
|
||||
<b> Du hast folgende Artikel bestellt:</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="padding: 20px; border:1px solid #eee; background-color: #f6fdf5" cellpadding="2" cellspacing="0" width="100%">
|
||||
@foreach($shopping_order->shopping_order_items as $shopping_order_item)
|
||||
<tr>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top; width: 10%; " >
|
||||
{{ $shopping_order_item->qty }} x
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top;">
|
||||
{{ $shopping_order_item->product->name }}
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top;">
|
||||
{{ $shopping_order_item->getFormattedPrice() }} EUR
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top;">
|
||||
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top;">
|
||||
Verpackungs- u. Versandkosten
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top;">
|
||||
{{ $shopping_order->getFormattedShipping() }} EUR
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top;">
|
||||
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top;">
|
||||
<b>Gesamtpreis</b>
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top;">
|
||||
<b>{{ $shopping_order->getFormattedTotalShipping() }} EUR</b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sub_headline">
|
||||
<b>Deine Rechnungsadresse:</b>
|
||||
</td>
|
||||
<tr>
|
||||
<td style="color:#37302d; ">
|
||||
|
||||
<table style="padding: 20px; border:1px solid #eee; background-color: #f6fdf5" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td style="color:#37302d;">
|
||||
@if($shopping_order->shopping_user->billing_company)
|
||||
{{ $shopping_order->shopping_user->billing_company }}<br>
|
||||
@endif
|
||||
|
||||
{{ $shopping_order->shopping_user->billing_firstname }}
|
||||
{{ $shopping_order->shopping_user->billing_lastname }} <br>
|
||||
<br>
|
||||
|
||||
{{ $shopping_order->shopping_user->billing_address }} <br>
|
||||
@if($shopping_order->shopping_user->billing_address_2)
|
||||
{{ $shopping_order->shopping_user->billing_address_2 }}<br>
|
||||
@endif
|
||||
|
||||
{{ $shopping_order->shopping_user->billing_zipcode }}
|
||||
{{ $shopping_order->shopping_user->billing_city }} <br>
|
||||
{{ $shopping_order->shopping_user->billing_country->getLocated() }} <br>
|
||||
|
||||
@if($shopping_order->shopping_user->billing_phone)
|
||||
<br><br> {{ $shopping_order->shopping_user->billing_phone }}<br>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sub_headline">
|
||||
<b>Deine Lieferadresse:</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color:#37302d;">
|
||||
<table style="padding: 20px; border:1px solid #eee; background-color: #f6fdf5" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td style="color:#37302d;">
|
||||
@if($shopping_order->shopping_user->same_as_billing)
|
||||
Lieferadresse ist gleich Rechnungsadresse
|
||||
@else
|
||||
|
||||
@if($shopping_order->shopping_user->shipping_company)
|
||||
{{ $shopping_order->shopping_user->shipping_company }}<br>
|
||||
@endif
|
||||
|
||||
{{ $shopping_order->shopping_user->shipping_firstname }}
|
||||
{{ $shopping_order->shopping_user->shipping_lastname }} <br>
|
||||
<br>
|
||||
|
||||
{{ $shopping_order->shopping_user->shipping_address }} <br>
|
||||
@if($shopping_order->shopping_user->shipping_address_2)
|
||||
{{ $shopping_order->shopping_user->shipping_address_2 }}<br>
|
||||
@endif
|
||||
|
||||
{{ $shopping_order->shopping_user->shipping_zipcode }}
|
||||
{{ $shopping_order->shopping_user->shipping_city }} <br>
|
||||
|
||||
{{ $shopping_order->shopping_user->shipping_country->getLocated() }} <br>
|
||||
|
||||
|
||||
@if($shopping_order->shopping_user->shipping_phone)
|
||||
<br><br> {{ $shopping_order->shopping_user->shipping_phone }}<br>
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color:#37302d;font-size: 14px;">
|
||||
<table style="margin: 0 auto;" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td style="color:#37302d;">
|
||||
{{ $copy3line }}
|
||||
<br>
|
||||
|
||||
@if($shopping_order->user_shop)
|
||||
@if($shopping_order->user_shop->title)
|
||||
<b>{{ $shopping_order->user_shop->title }}</b><br>
|
||||
@endif
|
||||
@if($shopping_order->user_shop->contact)
|
||||
{!! nl2br($shopping_order->user_shop->contact) !!}<br>
|
||||
@endif
|
||||
<a href="{{ $shopping_order->user_shop->getSubdomain() }}">{{ $shopping_order->user_shop->getSubdomain() }}</a>
|
||||
|
||||
@endif
|
||||
|
||||
|
||||
<hr><br>
|
||||
{{ $greetings }} <br><b>{{ $sender }}</b>
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="margin: 0 auto;" cellpadding="0" cellspacing="0" class="force-full-width"
|
||||
bgcolor="#f8f8f8">
|
||||
<tr>
|
||||
<td style="color:#7B7B7E; font-size:12px; line-height: 16px; text-align: center">
|
||||
<p>
|
||||
mivita e.K. | Leinfeld 2 | 87755 Kirchhaslach<br>
|
||||
Telefon: +49 (0) 8333 946 98 90 | Fax: +49 (0) 8333 7268<br>
|
||||
E-Mail: info@mivita.care<br></p>
|
||||
<a href="https://www.mivita.care" style="color: #7B7B7E; text-decoration: underline;">www.mivita.care</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color:#bbbbbb; font-size:12px; line-height: 16px; text-align: center">
|
||||
<p>Geschäftsinhaber: Alois Ried | Registergericht: Memmingen<br>
|
||||
Registernummer: HRA 12236 | USt-ID-Nr.: DE 244162340</p>
|
||||
|
||||
<a href="{{ Util::getUserCardBackUrl('/datenschutz') }}">Datenschutzerklärung</a><br>
|
||||
<a href="{{ Util::getUserCardBackUrl('/impressum') }}">Impressum</a><br>
|
||||
|
||||
© 2019 All Rights Reserved<br>
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -92,18 +92,37 @@
|
|||
<!-- CHECKOUT FINAL MESSAGE -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<h3>Thank you, John Doe.</h3>
|
||||
|
||||
<p>
|
||||
Your order has been placed. In a few moments you will receive an order confirmation email from us.<br />
|
||||
If you like, you can explore more <a href="{{ url('produkte') }}"> products</a>.
|
||||
</p>
|
||||
<h3>Vielen Dank, </h3>
|
||||
<p>Deine Bestellung wurde aufgenommen. In Kürze erhälst du von uns eine Bestellbestätigungs-E-Mail.</p>
|
||||
|
||||
<h4>Deine Bestellnummer ist: {{ $order_reference }}</h4>
|
||||
<hr />
|
||||
|
||||
@if($pay_trans && $pay_trans->shopping_payment)
|
||||
|
||||
@if($pay_trans->shopping_payment->clearingtype == "vor")
|
||||
<h3>Bezahlung per Vorkasse:</h3>
|
||||
<p>Bitte überweise {{ number_format( floatval($pay_trans->shopping_payment->amount/100), 2, ",", ".") }} EUR auf die folgende Kontoverbindung, um den Kauf abzuschließen.
|
||||
<br>
|
||||
<strong>Kontoinhaber:</strong> {{ $pay_trans->transmitted_data['clearing_bankaccountholder'] }} <br>
|
||||
<strong>IBAN:</strong> {{ $pay_trans->transmitted_data['clearing_bankiban'] }} <br>
|
||||
<strong>BIC:</strong> {{ $pay_trans->transmitted_data['clearing_bankbic'] }} <br>
|
||||
<strong>Bank:</strong> {{ $pay_trans->transmitted_data['clearing_bankname'] }} <br>
|
||||
<strong>Gesamtbetrag:</strong> {{ number_format( floatval($pay_trans->shopping_payment->amount/100), 2, ",", ".") }} EUR<br>
|
||||
<strong>Verwendungszweck:</strong> {{ $pay_trans->transmitted_data['clearing_bankcode'] }}
|
||||
</p>
|
||||
<hr />
|
||||
@endif
|
||||
|
||||
@if($pay_trans->shopping_payment->clearingtype == "cc")
|
||||
<h4>Bezahlung per Kreditkarte:</h4>
|
||||
<p>Deine Zahlung wurde genehmigt, eine Bestätigung der Zahlung wird automatisch erstellt.</p>
|
||||
<hr />
|
||||
@endif
|
||||
@endif
|
||||
<p>
|
||||
Thank you very much for choosing us,<br />
|
||||
<strong> Inc.</strong>
|
||||
Dein Team von,<br />
|
||||
<strong> mivita.</strong>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -84,13 +84,20 @@
|
|||
padding-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.error .select2-selection {
|
||||
.cc_error {
|
||||
border: #bf6464 2px dashed;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.error .select2-selection, .error select.form-control {
|
||||
border: #bf6464 2px dashed;
|
||||
}
|
||||
|
||||
fieldset.softhide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
<!-- -->
|
||||
<!-- CART -->
|
||||
|
|
@ -141,6 +148,18 @@
|
|||
</div>
|
||||
@endif
|
||||
|
||||
@if (\Session::has('errormessage'))
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger">
|
||||
{{ \Session::get('customermessage') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="m-checkout">
|
||||
{!! Form::open(['url' => route('checkout.checkout_card_final'), 'class' => 'row clearfix', 'id'=>'']) !!}
|
||||
|
|
@ -153,19 +172,19 @@
|
|||
<div class="col-md-12 col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="mt-0 fs-14 fw-400" for="billing_company">Firmenname (optional)</label>
|
||||
{!! Form::text('billing[company]', null, ['class' => 'form-control', 'id'=>'billing_company']) !!}
|
||||
{!! Form::text('billing_company', $shopping_user->billing_company, ['class' => 'form-control', 'id'=>'billing_company']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<div class="form-group {{($errors->has('billing.salutation') ? 'error' : '')}}">
|
||||
<div class="form-group {{($errors->has('billing_salutation') ? 'error' : '')}}">
|
||||
<label class="mt-0 fs-14 fw-400" for="billing_salutation">Anrede *</label>
|
||||
<select id="billing_salutation" name="billing[salutation]" class="form-control select2">
|
||||
{!! HTMLHelper::getSalutation(1) !!}
|
||||
<select id="billing_salutation" name="billing_salutation" class="form-control selectpicker">
|
||||
{!! HTMLHelper::getSalutation(($shopping_user->billing_salutation ? $shopping_user->billing_salutation : old('billing_salutation'))) !!}
|
||||
</select>
|
||||
@if ($errors->has('billing.salutation'))
|
||||
<label for="billing_salutation" class="error text-danger small" style="display: block;">{{ $errors->first('billing.salutation') }}</label>
|
||||
@if ($errors->has('billing_salutation'))
|
||||
<label for="billing_salutation" class="error text-danger small" style="display: block;">{{ $errors->first('billing_salutation') }}</label>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -174,18 +193,18 @@
|
|||
<div class="col-md-6 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="mt-0 fs-14 fw-400" for="billing_firstname">Vorname*</label>
|
||||
{!! Form::text('billing[firstname]', null, ['class' => 'form-control '.($errors->has('billing.firstname') ? 'error' : ''), 'id'=>'billing_firstname']) !!}
|
||||
@if ($errors->has('billing.firstname'))
|
||||
<label for="billing_firstname" class="error text-danger small" style="display: block;">{{ $errors->first('billing.firstname') }}</label>
|
||||
{!! Form::text('billing_firstname', $shopping_user->billing_firstname, ['class' => 'form-control '.($errors->has('billing_firstname') ? 'error' : ''), 'id'=>'billing_firstname']) !!}
|
||||
@if ($errors->has('billing_firstname'))
|
||||
<label for="billing_firstname" class="error text-danger small" style="display: block;">{{ $errors->first('billing_firstname') }}</label>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="mt-0 fs-14 fw-400" for="billing_lastname">Nachname*</label>
|
||||
{!! Form::text('billing[lastname]', null, ['class' => 'form-control '.($errors->has('billing.lastname') ? 'error' : ''), 'id'=>'billing_lastname']) !!}
|
||||
@if ($errors->has('billing.lastname'))
|
||||
<label for="billing_lastname" class="error text-danger small" style="display: block;">{{ $errors->first('billing.lastname') }}</label>
|
||||
{!! Form::text('billing_lastname', $shopping_user->billing_lastname, ['class' => 'form-control '.($errors->has('billing_lastname') ? 'error' : ''), 'id'=>'billing_lastname']) !!}
|
||||
@if ($errors->has('billing_lastname'))
|
||||
<label for="billing_lastname" class="error text-danger small" style="display: block;">{{ $errors->first('billing_lastname') }}</label>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -195,18 +214,18 @@
|
|||
<div class="col-lg-12">
|
||||
<div class="form-group">
|
||||
<label class="mt-0 fs-14 fw-400" for="billing_address">Straße Nr. *</label>
|
||||
{!! Form::text('billing[address]', null, ['class' => 'form-control '.($errors->has('billing.address') ? 'error' : ''), 'id'=>'billing_address']) !!}
|
||||
@if ($errors->has('billing.address'))
|
||||
<label for="billing_address" class="error text-danger small" style="display: block;">{{ $errors->first('billing.address') }}</label>
|
||||
{!! Form::text('billing_address', $shopping_user->billing_address, ['class' => 'form-control '.($errors->has('billing_address') ? 'error' : ''), 'id'=>'billing_address']) !!}
|
||||
@if ($errors->has('billing_address'))
|
||||
<label for="billing_address" class="error text-danger small" style="display: block;">{{ $errors->first('billing_address') }}</label>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<div class="form-group">
|
||||
<label class="mt-0 fs-14 fw-400" for="billing_address_2">Wohnung / Gebäude (optional)</label>
|
||||
{!! Form::text('billing[address_2]', null, ['class' => 'form-control '.($errors->has('billing.address_2') ? 'error' : ''), 'id'=>'billing_address_2']) !!}
|
||||
@if ($errors->has('billing.address_]'))
|
||||
<label for="billing_address_2" class="error text-danger small" style="display: block;">{{ $errors->first('billing.address_2') }}</label>
|
||||
{!! Form::text('billing_address_2', $shopping_user->billing_address_2, ['class' => 'form-control '.($errors->has('billing_address_2') ? 'error' : ''), 'id'=>'billing_address_2']) !!}
|
||||
@if ($errors->has('billing_address_2'))
|
||||
<label for="billing_address_2" class="error text-danger small" style="display: block;">{{ $errors->first('billing_address_2') }}</label>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -215,44 +234,44 @@
|
|||
<div class="row">
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<label class="mt-0 fs-14 fw-400" for="billing_zipcode">PLZ *</label>
|
||||
{!! Form::text('billing[zipcode]', null, ['class' => 'form-control '.($errors->has('billing.zipcode') ? 'error' : ''), 'id'=>'billing_zipcode']) !!}
|
||||
@if ($errors->has('billing.zipcode'))
|
||||
<label for="billing_zipcode" class="error text-danger small" style="display: block;">{{ $errors->first('billing.zipcode') }}</label>
|
||||
{!! Form::text('billing_zipcode', $shopping_user->billing_zipcode, ['class' => 'form-control '.($errors->has('billing_zipcode') ? 'error' : ''), 'id'=>'billing_zipcode']) !!}
|
||||
@if ($errors->has('billing_zipcode'))
|
||||
<label for="billing_zipcode" class="error text-danger small" style="display: block;">{{ $errors->first('billing_zipcode') }}</label>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<label class="mt-0 fs-14 fw-400" for="billing_city">Stadt *</label>
|
||||
{!! Form::text('billing[city]', null, ['class' => 'form-control '.($errors->has('billing.city') ? 'error' : ''), 'id'=>'billing_city']) !!}
|
||||
@if ($errors->has('billing.city'))
|
||||
<label for="billing_city" class="error text-danger small" style="display: block;">{{ $errors->first('billing.city') }}</label>
|
||||
{!! Form::text('billing_city', $shopping_user->billing_city, ['class' => 'form-control '.($errors->has('billing_city') ? 'error' : ''), 'id'=>'billing_city']) !!}
|
||||
@if ($errors->has('billing_city'))
|
||||
<label for="billing_city" class="error text-danger small" style="display: block;">{{ $errors->first('billing_city') }}</label>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<label class="mt-0 fs-14 fw-400" for="billing_state">Land *</label>
|
||||
<select id="billing_state" name="billing[state]" class="form-control select2 required" disabled="true">
|
||||
<select id="billing_state" name="billing_state" class="form-control select2 required" disabled="true">
|
||||
{!! HTMLHelper::getCountriesForShipping(Yard::instance('shopping')->getShippingCountryId()) !!}
|
||||
</select>
|
||||
<input type="hidden" name="billing[country_id]" value="{{Yard::instance('shopping')->getShippingCountryId()}}">
|
||||
<input type="hidden" name="billing_country_id" value="{{Yard::instance('shopping')->getShippingCountryId()}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<label class="mt-0 fs-14 fw-400" for="billing_phone">Telefon (optional)</label>
|
||||
{!! Form::text('billing[phone]', null, ['class' => 'form-control '.($errors->has('billing.phone') ? 'error' : ''), 'id'=>'billing_phone']) !!}
|
||||
@if ($errors->has('billing.phone'))
|
||||
<label for="billing_phone" class="error text-danger small" style="display: block;">{{ $errors->first('billing.phone') }}</label>
|
||||
{!! Form::text('billing_phone', $shopping_user->billing_phone, ['class' => 'form-control '.($errors->has('billing_phone') ? 'error' : ''), 'id'=>'billing_phone']) !!}
|
||||
@if ($errors->has('billing_phone'))
|
||||
<label for="billing_phone" class="error text-danger small" style="display: block;">{{ $errors->first('billing_phone') }}</label>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<label class="mt-0 fs-14 fw-400" for="billing_email">E-Mail *</label>
|
||||
{!! Form::email('billing[email]', null, ['class' => 'form-control '.($errors->has('billing.email') ? 'error' : ''), 'id'=>'billing_email']) !!}
|
||||
@if ($errors->has('billing.email'))
|
||||
<label for="billing_email" class="error text-danger small" style="display: block;">{{ $errors->first('billing.email') }}</label>
|
||||
{!! Form::email('billing_email', $shopping_user->billing_email, ['class' => 'form-control '.($errors->has('billing_email') ? 'error' : ''), 'id'=>'billing_email']) !!}
|
||||
@if ($errors->has('billing_email'))
|
||||
<label for="billing_email" class="error text-danger small" style="display: block;">{{ $errors->first('billing_email') }}</label>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -261,7 +280,7 @@
|
|||
<div class="col-md-12 col-sm-12">
|
||||
<hr>
|
||||
<label class="checkbox {{ ($errors->has('accepted_data_checkbox') ? 'error' : '') }}" for="accepted_data_checkbox" style="font-size: 14px;line-height: 22px; font-weight: 400">
|
||||
{!! Form::checkbox('accepted_data_checkbox', 1, false, ['id'=>'accepted_data_checkbox', 'class' => 'form-control '.($errors->has('accepted_data_checkbox') ? 'error' : '')]) !!}
|
||||
{!! Form::checkbox('accepted_data_checkbox', 1, $shopping_user->accepted_data_checkbox, ['id'=>'accepted_data_checkbox', 'class' => 'form-control '.($errors->has('accepted_data_checkbox') ? 'error' : '')]) !!}
|
||||
<i></i> Mit Klick auf "Jetzt kaufen" akzeptiere ich die <a href="{{ url('/datenschutz') }}">Allgemeinen Geschäftsbedingungen</a>, die <a href="{{ url('/datenschutz') }}">Widerrufsbestimmungen</a> und die <a href="{{ url('/datenschutz') }}">Datenschutzbelehrung</a>, damit für die Bestellung meine Daten verarbeitet werden können.
|
||||
</label>
|
||||
@if ($errors->has('accepted_data_checkbox'))
|
||||
|
|
@ -276,7 +295,7 @@
|
|||
<div class="col-lg-12 nomargin clearfix">
|
||||
<hr>
|
||||
<label class="mt-0 fs-14 fw-400 checkbox pull-left"><!-- see assets/js/view/demo.shop.js - CHECKOUT section -->
|
||||
{!! Form::checkbox('shipping[same_as_billing]', 1, true, ['id'=>'shipswitch', 'class' => '']) !!}
|
||||
{!! Form::checkbox('same_as_billing', 1, $shopping_user->same_as_billing, ['id'=>'shipswitch', 'class' => '']) !!}
|
||||
<i></i> <span class="weight-300">Versand an die gleiche Adresse</span>
|
||||
</label>
|
||||
</div>
|
||||
|
|
@ -298,19 +317,23 @@
|
|||
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<label class="mt-0 fs-14 fw-400" for="shipping_company">Firmenname (optional)</label>
|
||||
{!! Form::text('shipping[company]', null, ['class' => 'form-control', 'id'=>'billing_company']) !!}
|
||||
{!! Form::text('shipping_company', $shopping_user->shipping_company, ['class' => 'form-control', 'id'=>'billing_company']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<div class="form-group {{($errors->has('billing_salutation') ? 'error' : '')}}">
|
||||
|
||||
|
||||
<label class="mt-0 fs-14 fw-400" for="shipping_salutation">Anrede *</label>
|
||||
<select id="shipping_salutation" name="shipping[salutation]" class="form-control select2">
|
||||
{!! HTMLHelper::getSalutation(1) !!}
|
||||
<select id="shipping_salutation" name="shipping_salutation" class="form-control selectpicker">
|
||||
{!! HTMLHelper::getSalutation(($shopping_user->shipping_salutation ? $shopping_user->shipping_salutation : old('shipping_salutation'))) !!}
|
||||
</select>
|
||||
@if ($errors->has('shipping.firstname'))
|
||||
<label for="shipping_salutation" class="error text-danger small" style="display: block;">{{ $errors->first('shipping.salutation') }}</label>
|
||||
@if ($errors->has('shipping_salutation'))
|
||||
<label for="shipping_salutation" class="error text-danger small" style="display: block;">{{ $errors->first('shipping_salutation') }}</label>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -318,18 +341,18 @@
|
|||
<div class="col-md-6 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="mt-0 fs-14 fw-400" for="shipping_firstname">Vorname*</label>
|
||||
{!! Form::text('shipping[firstname]', null, ['class' => 'form-control '.($errors->has('shipping.firstname') ? 'error' : ''), 'id'=>'shipping_firstname']) !!}
|
||||
@if ($errors->has('shipping.firstname'))
|
||||
<label for="shipping_firstname" class="error text-danger small" style="display: block;">{{ $errors->first('shipping.firstname') }}</label>
|
||||
{!! Form::text('shipping_firstname', $shopping_user->shipping_firstname, ['class' => 'form-control '.($errors->has('shipping_firstname') ? 'error' : ''), 'id'=>'shipping_firstname']) !!}
|
||||
@if ($errors->has('shipping_firstname'))
|
||||
<label for="shipping_firstname" class="error text-danger small" style="display: block;">{{ $errors->first('shipping_firstname') }}</label>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="mt-0 fs-14 fw-400" for="shipping_lastname">Nachname*</label>
|
||||
{!! Form::text('shipping[lastname]', null, ['class' => 'form-control '.($errors->has('shipping.lastname') ? 'error' : ''), 'id'=>'shipping_lastname']) !!}
|
||||
@if ($errors->has('shipping.lastname'))
|
||||
<label for="shipping_lastname" class="error text-danger small" style="display: block;">{{ $errors->first('shipping.lastname') }}</label>
|
||||
{!! Form::text('shipping_lastname', $shopping_user->shipping_lastname, ['class' => 'form-control '.($errors->has('shipping_lastname') ? 'error' : ''), 'id'=>'shipping_lastname']) !!}
|
||||
@if ($errors->has('shipping_lastname'))
|
||||
<label for="shipping_lastname" class="error text-danger small" style="display: block;">{{ $errors->first('shipping_lastname') }}</label>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -339,18 +362,18 @@
|
|||
<div class="col-lg-12">
|
||||
<div class="form-group">
|
||||
<label class="mt-0 fs-14 fw-400" for="shipping_address">Straße Nr. *</label>
|
||||
{!! Form::text('shipping[address]', null, ['class' => 'form-control '.($errors->has('shipping.address') ? 'error' : ''), 'id'=>'shipping_address']) !!}
|
||||
@if ($errors->has('shipping.address'))
|
||||
<label for="shipping_address" class="error text-danger small" style="display: block;">{{ $errors->first('shipping.address') }}</label>
|
||||
{!! Form::text('shipping_address', $shopping_user->shipping_address, ['class' => 'form-control '.($errors->has('shipping_address') ? 'error' : ''), 'id'=>'shipping_address']) !!}
|
||||
@if ($errors->has('shipping_address'))
|
||||
<label for="shipping_address" class="error text-danger small" style="display: block;">{{ $errors->first('shipping_address') }}</label>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<div class="form-group">
|
||||
<label class="mt-0 fs-14 fw-400" for="shipping_address_2">Wohnung / Gebäude (optional)</label>
|
||||
{!! Form::text('shipping[address_2]', null, ['class' => 'form-control '.($errors->has('shipping.address_2') ? 'error' : ''), 'id'=>'shipping_address_2']) !!}
|
||||
@if ($errors->has('shipping.address_]'))
|
||||
<label for="shipping_address_2" class="error text-danger small" style="display: block;">{{ $errors->first('shipping.address_2') }}</label>
|
||||
{!! Form::text('shipping_address_2', $shopping_user->shipping_address_2, ['class' => 'form-control '.($errors->has('shipping_address_2') ? 'error' : ''), 'id'=>'shipping_address_2']) !!}
|
||||
@if ($errors->has('shipping_address_2'))
|
||||
<label for="shipping_address_2" class="error text-danger small" style="display: block;">{{ $errors->first('shipping_address_2') }}</label>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -359,16 +382,16 @@
|
|||
<div class="row">
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<label class="mt-0 fs-14 fw-400" for="shipping_zipcode">PLZ *</label>
|
||||
{!! Form::text('shipping[zipcode]', null, ['class' => 'form-control '.($errors->has('shipping.zipcode') ? 'error' : ''), 'id'=>'shipping_zipcode']) !!}
|
||||
@if ($errors->has('shipping.zipcode'))
|
||||
<label for="shipping_zipcode" class="error text-danger small" style="display: block;">{{ $errors->first('shipping.zipcode') }}</label>
|
||||
{!! Form::text('shipping_zipcode', $shopping_user->shipping_zipcode, ['class' => 'form-control '.($errors->has('shipping_zipcode') ? 'error' : ''), 'id'=>'shipping_zipcode']) !!}
|
||||
@if ($errors->has('shipping_zipcode'))
|
||||
<label for="shipping_zipcode" class="error text-danger small" style="display: block;">{{ $errors->first('shipping_zipcode') }}</label>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<label class="mt-0 fs-14 fw-400" for="shipping_city">Stadt *</label>
|
||||
{!! Form::text('shipping[city]', null, ['class' => 'form-control '.($errors->has('shipping.city') ? 'error' : ''), 'id'=>'shipping_city']) !!}
|
||||
@if ($errors->has('shipping.city'))
|
||||
<label for="shipping_city" class="error text-danger small" style="display: block;">{{ $errors->first('shipping.city') }}</label>
|
||||
{!! Form::text('shipping_city', $shopping_user->shipping_city, ['class' => 'form-control '.($errors->has('shipping_city') ? 'error' : ''), 'id'=>'shipping_city']) !!}
|
||||
@if ($errors->has('shipping_city'))
|
||||
<label for="shipping_city" class="error text-danger small" style="display: block;">{{ $errors->first('shipping_city') }}</label>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
|
|
@ -377,19 +400,19 @@
|
|||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<label class="mt-0 fs-14 fw-400" for="shipping_state">Land *</label>
|
||||
<select id="shipping_state" name="shipping[state]" class="form-control select2 required" disabled="true">
|
||||
<select id="shipping_state" name="shipping_state" class="form-control select2 required" disabled="true">
|
||||
{!! HTMLHelper::getCountriesForShipping(Yard::instance('shopping')->getShippingCountryId()) !!}
|
||||
</select>
|
||||
<input type="hidden" name="shipping[country_id]" value="{{Yard::instance('shopping')->getShippingCountryId()}}">
|
||||
<input type="hidden" name="shipping_country_id" value="{{Yard::instance('shopping')->getShippingCountryId()}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<label class="mt-0 fs-14 fw-400" for="shipping_phone">Telefon (optional)</label>
|
||||
{!! Form::text('shipping[phone]', null, ['class' => 'form-control '.($errors->has('shipping.phone') ? 'error' : ''), 'id'=>'shipping_phone']) !!}
|
||||
@if ($errors->has('shipping.phone'))
|
||||
<label for="shipping_phone" class="error text-danger small" style="display: block;">{{ $errors->first('shipping.phone') }}</label>
|
||||
{!! Form::text('shipping_phone', $shopping_user->shipping_phone, ['class' => 'form-control '.($errors->has('shipping_phone') ? 'error' : ''), 'id'=>'shipping_phone']) !!}
|
||||
@if ($errors->has('shipping_phone'))
|
||||
<label for="shipping_phone" class="error text-danger small" style="display: block;">{{ $errors->first('shipping_phone') }}</label>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -408,55 +431,61 @@
|
|||
<h4>Zahlungsart</h4>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="toggle-transparent toggle-bordered-full clearfix">
|
||||
<div class="toggle active">
|
||||
<div class="toggle-content">
|
||||
|
||||
|
||||
<div class="row nomargin-bottom">
|
||||
<div class="col-lg-12 nomargin clearfix">
|
||||
<label class="mt-0 fs-14 fw-400 radio pull-left nomargin-top">
|
||||
<input name="payment_method" type="radio" value="wlt#PPE" checked="checked" />
|
||||
<label class="mt-0 fs-14 fw-400 radio pull-left nomargin-top" style="width: 100%">
|
||||
{!! Form::radio('payment_method', 'wlt#PPE', (!old('payment_method') ? '1' : '')) !!}
|
||||
<i></i> <span class="weight-400"><span class="fa fa-check text-primary"></span> PayPal</span>
|
||||
<img class="float-right" width="90" src="{{asset('images/payments-assets/paypal.png')}}" alt="Mastercard + Visa">
|
||||
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-lg-12 nomargin clearfix">
|
||||
<label class="mt-0 fs-14 fw-400 radio pull-left nomargin-top">
|
||||
<input name="payment_method" type="radio" value="cc" />
|
||||
<i></i> <span class="weight-400"><span class="fa fa-check text-primary"></span> Visa oder MasterCard (inkl. Maestro)</span>
|
||||
<label class="mt-4 fs-14 fw-400 radio pull-left nomargin-top" style="width: 100%">
|
||||
{!! Form::radio('payment_method', 'cc', '') !!}
|
||||
<i></i> <span class="weight-400"><span class="fa fa-check text-primary"></span> Kreditkarte</span>
|
||||
<img class="float-right" width="90" src="{{asset('images/payments-assets/creditcard.png')}}" alt="Mastercard + Visa">
|
||||
</label>
|
||||
</div>
|
||||
{{-- <div class="col-lg-12 nomargin clearfix">
|
||||
<label class="mt-0 fs-14 fw-400 radio pull-left">
|
||||
<label class="mt-0 fs-14 fw-400 radio pull-left" style="width: 100%">
|
||||
<input name="payment_method" type="radio" value="sb#GPY" />
|
||||
<i></i> <span class="weight-400"><span class="fa fa-check text-primary"></span> giropay - Online-Überweisung</span>
|
||||
</label>
|
||||
</div>
|
||||
--}}
|
||||
<div class="col-lg-12 nomargin clearfix">
|
||||
<label class="mt-0 fs-14 fw-400 radio pull-left">
|
||||
<input name="payment_method" type="radio" value="sb#PNT" />
|
||||
<i></i> <span class="weight-400"><span class="fa fa-check text-primary"></span> Sofort - Online-Überweisung</span>
|
||||
<label class="mt-4 fs-14 fw-400 radio pull-left" style="width: 100%">
|
||||
{!! Form::radio('payment_method', 'sb#PNT', '') !!}
|
||||
<i></i> <span class="weight-400"><span class="fa fa-check text-primary"></span> Sofort -Überweisung</span>
|
||||
<img class="float-right" width="90" src="{{asset('images/payments-assets/sofort.png')}}" alt="Sofort">
|
||||
</label>
|
||||
</div>
|
||||
{{-- <div class="col-lg-12 nomargin clearfix">
|
||||
<label class="mt-0 fs-14 fw-400 radio pull-left">
|
||||
|
||||
<!--<div class="col-lg-12 nomargin clearfix">
|
||||
<label class="mt-0 fs-14 fw-400 radio pull-left" style="width: 100%">
|
||||
<input name="payment_method" type="radio" value="wlt#PDT" />
|
||||
<i></i> <span class="weight-400"><span class="fa fa-check text-primary"></span> paydirekt </span>
|
||||
</label>
|
||||
</div>
|
||||
--}}
|
||||
<div class="col-lg-12 nomargin clearfix">
|
||||
<label class="mt-0 fs-14 fw-400 radio pull-left">
|
||||
<input name="payment_method" type="radio" value="fnc" />
|
||||
-->
|
||||
|
||||
<!-- <div class="col-lg-12 nomargin clearfix">
|
||||
<label class="mt-0 fs-14 fw-400 radio pull-left" style="width: 100%">
|
||||
<input name="payment_method" type="radio" value="fnc#PYS" />
|
||||
<i></i> <span class="weight-400"><span class="fa fa-check text-primary"></span> Rechnungskauf</span>
|
||||
</label>
|
||||
</div>
|
||||
-->
|
||||
<div class="col-lg-12 nomargin clearfix">
|
||||
<label class="mt-0 fs-14 fw-400 radio pull-left">
|
||||
<input name="payment_method" type="radio" value="prefore" />
|
||||
<i></i> <span class="weight-400">Vorauskasse</span>
|
||||
<label class="mt-4 fs-14 fw-400 radio pull-left" style="width: 100%">
|
||||
{!! Form::radio('payment_method', 'vor', '') !!}
|
||||
<i></i> <span class="weight-400"><span class="fa fa-check text-primary"></span> Vorkasse</span>
|
||||
<img class="float-right" width="90" src="{{asset('images/payments-assets/vor.png')}}" alt="Vorkasse">
|
||||
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -467,6 +496,85 @@
|
|||
</fieldset>
|
||||
<!-- /PAYMENT METHOD -->
|
||||
|
||||
<!-- PAYMENT METHOD -->
|
||||
<fieldset class="box-border-shadow p-20 softhide @if (\Session::has('cc-error')) cc_error @endif" id="creditcard-box-holder">
|
||||
|
||||
<style>
|
||||
#cc_content_check .form-group {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
#cc_content_check input.form-control {
|
||||
padding: 14px 20px;
|
||||
}
|
||||
</style>
|
||||
<h4>Kreditkarte</h4>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="toggle-transparent toggle-bordered-full clearfix">
|
||||
<div class="toggle active">
|
||||
<div class="toggle-content" id="cc_content_check">
|
||||
<input type="hidden" name="pseudocardpan" id="pseudocardpan">
|
||||
<input type="hidden" name="truncatedcardpan" id="truncatedcardpan">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="mt-0 fs-14 fw-400" for="cc_cardtype">Kreditkarte *</label>
|
||||
<select id="cc_cardtype" name="cc_cardtype" class="form-control selectpicker">
|
||||
<option value="V" @if(old('cc_cardtype') && old('cc_cardtype') == 'V') selected="selected" @endif>VISA</option>
|
||||
<option value="M" @if(old('cc_cardtype') && old('cc_cardtype') == 'M') selected="selected" @endif>Mastercard</option>
|
||||
<!-- <option value="A">Amex</option> -->
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<label class="mt-0 fs-14 fw-400">Inhaber*</label>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
{!! Form::text('cc_cardholder_first', '', ['class' => 'form-control', 'id'=>'cc_cardholder_first', 'placeholder'=>'Vorname']) !!}
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
{!! Form::text('cc_cardholder_last', '', ['class' => 'form-control', 'id'=>'cc_cardholder_last', 'placeholder'=>'Nachname']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="mt-0 fs-14 fw-400">Kreditkartennummer*</label>
|
||||
|
||||
{!! Form::text('cc_cardpan', '', ['class' => 'form-control', 'id'=>'cc_cardpan', 'placeholder'=>'Kreditkartennummer']) !!}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-12 col-md-8">
|
||||
<label class="mt-0 fs-14 fw-400">Gültis bis*</label>
|
||||
<div style="width: 40%" class="float-left">
|
||||
<select id="cc_cardexpiremonth" name="cc_cardexpiremonth" class="form-control selectpicker">
|
||||
@php( $months = range(1, 12))
|
||||
@foreach($months as $month)
|
||||
@php( $month = sprintf('%02d', $month) )
|
||||
<option value="{{$month}}" @if(old('cc_cardexpiremonth') && old('cc_cardexpiremonth') == $month) selected="selected" @endif>{{$month}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div style="width: 60%;" class="float-right">
|
||||
<select id="cc_cardexpireyear" name="cc_cardexpireyear" class="form-control selectpicker">
|
||||
@php( $years = range(date("Y"), date('Y', strtotime('+6 years'))) )
|
||||
@foreach($years as $year)
|
||||
<option value="{{$year}}" @if(old('cc_cardexpireyear') && old('cc_cardexpireyear') == $year) selected="selected" @endif>{{$year}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-sm-12 col-md-4">
|
||||
<label class="mt-0 fs-14 fw-400">Prüfnr.*</label>
|
||||
|
||||
{!! Form::text('cc_cardcvc2', '', ['class' => 'form-control', 'id'=>'cc_cardcvc2', 'placeholder'=>'CVC*']) !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<!-- TOTAL / PLACE ORDER -->
|
||||
<div class="toggle-transparent toggle-bordered-full clearfix">
|
||||
<div class="toggle active">
|
||||
|
|
@ -517,46 +625,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /TOTAL / PLACE ORDER -->
|
||||
{{--
|
||||
<!-- CREATE ACCOUNT -->
|
||||
<div class="toggle-transparent toggle-bordered-full margin-top-30 clearfix">
|
||||
<div class="toggle active">
|
||||
<div class="toggle-content">
|
||||
|
||||
<div class="clearfix">
|
||||
<label class="mt-0 fs-14 fw-400 checkbox pull-left">
|
||||
<input id="accountswitch" name="create-account[yes]" type="checkbox" value="1" />
|
||||
<i></i> <span class="weight-300">Create an account for later use</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- CREATE ACCOUNT FORM -->
|
||||
<div id="newaccount" class="margin-top-10 margin-bottom-30 softhide">
|
||||
|
||||
<div class="row nomargin-bottom">
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<label class="mt-0 fs-14 fw-400" for="account:password">Password *</label>
|
||||
<input id="account:password" name="account[password]" type="password" class="form-control" />
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<label class="mt-0 fs-14 fw-400" for="account:password2">Confirm Password *</label>
|
||||
<input id="account:password2" name="account[password2]" type="password" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<small class="text-warning">NOTE: Email address will be used to login</small>
|
||||
|
||||
</div>
|
||||
<!-- /CREATE ACCOUNT FORM -->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /CREATE ACCOUNT -->
|
||||
--}}
|
||||
|
||||
</div>
|
||||
<!-- /CHECKOUT -->
|
||||
{!! Form::close() !!}
|
||||
|
|
|
|||
|
|
@ -80,6 +80,87 @@
|
|||
jQuery('.quick-cart-box').css('display', 'none');
|
||||
});
|
||||
|
||||
|
||||
function showCreditCardPayment(val){
|
||||
console.log(val);
|
||||
if(val === 'cc'){
|
||||
$('#creditcard-box-holder').show('slow');
|
||||
}else{
|
||||
$('#creditcard-box-holder').hide('slow');
|
||||
}
|
||||
|
||||
}
|
||||
showCreditCardPayment(jQuery('input[name="payment_method"]:checked').val());
|
||||
jQuery('input[name="payment_method"]').on('change', function () {
|
||||
showCreditCardPayment($(this).val());
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
{{--
|
||||
<script type="text/javascript" src="https://secure.pay1.de/client-api/js/v1/payone_hosted_min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
$('#cc_cardtype')
|
||||
$('#cc_cardholder_first')
|
||||
$('#cc_cardholder_last')
|
||||
$('#cc_cardpan')
|
||||
var data = {
|
||||
request : 'creditcardcheck',
|
||||
responsetype : 'REDIRECT', // JSON or REDIRECT available
|
||||
mode : 'live',
|
||||
mid : '10000',
|
||||
aid : '10001',
|
||||
portalid : '2000000',
|
||||
encoding : 'UTF-8',
|
||||
storecarddata : 'yes',
|
||||
hash : '19062005567ca72601cc9d031f9a94b1',
|
||||
cardholder : document.Testform.cardholder.value,
|
||||
cardpan : document.Testform.cardpan.value,
|
||||
cardtype : document.Testform.cardtype.value,
|
||||
cardexpiremonth : document.Testform.cardexpiremonth.value,
|
||||
cardexpireyear : document.Testform.cardexpireyear.value,
|
||||
cardcvc2 : document.Testform.cardcvc2.value,
|
||||
language : 'en'
|
||||
};
|
||||
var options = {
|
||||
return_type : 'object',
|
||||
callbackFunctionName: 'processPayoneResponse'
|
||||
};
|
||||
function processPayoneResponse(response) {
|
||||
if (response.get('status') == 'VALID') {
|
||||
document.Testform.cardpan.value=’’;
|
||||
document.Testform.cardcvc2.value=’’;
|
||||
document.Testform.pseudocardpan.value=response.get('pseudocardpan')
|
||||
document.Testform.submit();
|
||||
}
|
||||
else {
|
||||
alert(response.get('customermessage'));
|
||||
}
|
||||
}
|
||||
var request = new PayoneRequest(data, options);
|
||||
request.checkAndStore();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/* JSON response example
|
||||
{
|
||||
"status" : "ERROR",
|
||||
"errorcode" : "1078",
|
||||
"errormessage" : "Parameter {cardpan} incorrect or missing",
|
||||
"customermessage" : "Invalid cardpan. Please check the information on the card.",
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
</script>
|
||||
--}}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -7,16 +7,19 @@
|
|||
Du möchtest Vertriebspartner werden oder hast Fragen zu unseren Produkten?
|
||||
</p>
|
||||
@if(Util::isCheckout())
|
||||
|
||||
<h3>
|
||||
Jetzt Kontakt aufnehmen: <a href="{{ Util::getUserShopBackUrl('/kontakt') }}" rel="nofollow" class="btn btn-primary btn-lg">zum Kontakt</a>
|
||||
</h3>
|
||||
|
||||
@if(isset($order_reference))
|
||||
<h3>
|
||||
<a href="{{ Util::getUserShopBackUrl('') }}" rel="nofollow" class="btn btn-primary btn-lg">zurück zum Shop</a>
|
||||
</h3>
|
||||
@else
|
||||
<h3>
|
||||
Jetzt Kontakt aufnehmen: <a href="{{ Util::getUserCardBackUrl('/kontakt') }}" rel="nofollow" class="btn btn-primary btn-lg">zum Kontakt</a>
|
||||
</h3>
|
||||
@endif
|
||||
@else
|
||||
<h3>
|
||||
Jetzt Kontakt aufnehmen: <a href="{{url('/kontakt')}}" rel="nofollow" class="btn btn-primary btn-lg">zum Kontakt</a>
|
||||
</h3>
|
||||
|
||||
@endif
|
||||
</div><!-- /left text -->
|
||||
</div>
|
||||
|
|
@ -61,9 +64,16 @@
|
|||
<div class="col-md-4">
|
||||
<!-- Links -->
|
||||
<h4 class="letter-spacing-1"> </h4>
|
||||
<a href="{{ Util::getUserShopBackUrl('/card/show') }}">
|
||||
<i class="fa fa-chevron-left"></i> zurück zum Warenkorb
|
||||
</a>
|
||||
|
||||
@if(isset($order_reference))
|
||||
<a href="{{ Util::getUserShopBackUrl('') }}">
|
||||
<i class="fa fa-chevron-left"></i> zurück zum Shop
|
||||
</a>
|
||||
@else
|
||||
<a href="{{ Util::getUserCardBackUrl('/card/show') }}">
|
||||
<i class="fa fa-chevron-left"></i> zurück zum Warenkorb
|
||||
</a>
|
||||
@endif
|
||||
<!-- /Links -->
|
||||
</div>
|
||||
@else
|
||||
|
|
@ -96,9 +106,9 @@
|
|||
<div class="container">
|
||||
@if(Util::isCheckout())
|
||||
<ul class="pull-right nomargin list-inline mobile-block">
|
||||
<li><a href="{{ Util::getUserShopBackUrl('/datenschutz') }}">Datenschutzerklärung</a></li>
|
||||
<li><a href="{{ Util::getUserCardBackUrl('/datenschutz') }}">Datenschutzerklärung</a></li>
|
||||
<li>•</li>
|
||||
<li><a href="{{ Util::getUserShopBackUrl('/impressum') }}">Impressum</a></li>
|
||||
<li><a href="{{ Util::getUserCardBackUrl('/impressum') }}">Impressum</a></li>
|
||||
</ul>
|
||||
|
||||
@else
|
||||
|
|
|
|||
|
|
@ -59,18 +59,31 @@
|
|||
</button>
|
||||
|
||||
@if(Util::isCheckout())
|
||||
<a class="logo pull-left" href="{{ Util::getUserShopBackUrl('/') }}">
|
||||
<img class="fixed_top" src="/assets/images/logo_mivita.png" alt="mivita" />
|
||||
<img class="fixed_scroll" src="/assets/images/logo_mivita_fixed.png" alt="mivita" />
|
||||
</a>
|
||||
|
||||
@if(isset($order_reference))
|
||||
<a class="logo pull-left" href="{{ Util::getUserShopBackUrl('/') }}">
|
||||
<img class="fixed_top" src="/assets/images/logo_mivita.png" alt="mivita" />
|
||||
<img class="fixed_scroll" src="/assets/images/logo_mivita_fixed.png" alt="mivita" />
|
||||
</a>
|
||||
@else
|
||||
<a class="logo pull-left" href="{{ Util::getUserCardBackUrl('/') }}">
|
||||
<img class="fixed_top" src="/assets/images/logo_mivita.png" alt="mivita" />
|
||||
<img class="fixed_scroll" src="/assets/images/logo_mivita_fixed.png" alt="mivita" />
|
||||
</a>
|
||||
@endif
|
||||
<div class="navbar-collapse pull-right nav-main-collapse collapse">
|
||||
<nav class="nav-main">
|
||||
<ul id="topMain" class="nav nav-pills nav-main nav-onepage">
|
||||
<li class="">
|
||||
<a href="{{ Util::getUserShopBackUrl('/card/show') }}">
|
||||
<i class="fa fa-chevron-left"></i> zurück zum Warenkorb
|
||||
</a>
|
||||
@if(isset($order_reference))
|
||||
<a href="{{ Util::getUserShopBackUrl('') }}">
|
||||
<i class="fa fa-chevron-left"></i> zurück zum Shop
|
||||
</a>
|
||||
@else
|
||||
<a href="{{ Util::getUserCardBackUrl('/card/show') }}">
|
||||
<i class="fa fa-chevron-left"></i> zurück zum Warenkorb
|
||||
</a>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
|||
|
|
@ -235,11 +235,22 @@ Route::domain(config('app.checkout_url').config('app.domain'))->group(function (
|
|||
|
||||
Route::group(['middleware' => ['checkout']], function() {
|
||||
|
||||
Route::get('/checkout/card/{identifier}', 'Web\CheckoutController@checkout')->name('checkout.checkout_card');
|
||||
Route::get('/checkout/card/{identifier?}', 'Web\CheckoutController@checkout')->name('checkout.checkout_card');
|
||||
Route::post('/checkout/card/final', 'Web\CheckoutController@checkoutFinal')->name('checkout.checkout_card_final');
|
||||
|
||||
Route::get('/transaction/status/{check?}', 'Web\CheckoutController@transactionStatus')->name('checkout.transaction_status');
|
||||
Route::post('/transaction/status/{check?}', 'Web\CheckoutController@transactionStatus')->name('checkout.transaction_status');
|
||||
Route::get('/transaction/status/{status?}/{reference?}', 'Web\CheckoutController@transactionStatus')->name('checkout.transaction_status');
|
||||
Route::post('/transaction/status/{status?}/{reference?}', 'Web\CheckoutController@transactionStatus')->name('checkout.transaction_status');
|
||||
|
||||
Route::get('/transaction/approved/{transactionId}/{reference}', 'Web\CheckoutController@transactionApproved')->name('checkout.transaction_approved');
|
||||
|
||||
|
||||
|
||||
Route::get('/payment/status', 'Web\CheckoutController@paymentStatus')->name('checkout.payment_status');
|
||||
Route::post('/payment/status', 'Web\CheckoutController@paymentStatus')->name('checkout.payment_status');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
|
@ -262,8 +273,10 @@ Route::domain('{subdomain}.'.config('app.domain'))->group(function () {
|
|||
Route::post('/card/update', 'Web\CardController@updateCard')->name('user.card_update');
|
||||
Route::get('/card/remove/{rowId}', 'Web\CardController@removeCard')->name('user.card_remove');
|
||||
Route::get('/card/delete', 'Web\CardController@deleteCard')->name('user.card_delete');
|
||||
Route::get('/back/to/shop', 'Web\CardController@backToShop')->name('user.back_to_shop');
|
||||
Route::get('/{site}/{subsite?}/{product_slug?}', 'Web\SiteController@site')->name('user.site');
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue