codigo actual del servidor, con avances de joan
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
<script src="//pay.voguepay.com/js/voguepay.js"></script>
|
||||
|
||||
<script>
|
||||
closedFunction=function() {
|
||||
location.href = '{{ env('APP_URL') }}'
|
||||
}
|
||||
|
||||
successFunction=function(transaction_id) {
|
||||
location.href = '{{ env('APP_URL') }}'+'/vogue-pay/success/'+transaction_id
|
||||
}
|
||||
failedFunction=function(transaction_id) {
|
||||
location.href = '{{ env('APP_URL') }}'+'/vogue-pay/failure/'+transaction_id
|
||||
}
|
||||
</script>
|
||||
@if (get_setting('voguepay_sandbox') == 1)
|
||||
<input type="hidden" id="merchant_id" name="v_merchant_id" value="demo">
|
||||
@else
|
||||
<input type="hidden" id="merchant_id" name="v_merchant_id" value="{{ env('VOGUE_MERCHANT_ID') }}">
|
||||
@endif
|
||||
|
||||
<script>
|
||||
|
||||
window.onload = function(){
|
||||
pay3();
|
||||
}
|
||||
|
||||
function pay3() {
|
||||
Voguepay.init({
|
||||
v_merchant_id: document.getElementById("merchant_id").value,
|
||||
total: '{{\App\Models\CombinedOrder::findOrFail(Session::get('combined_order_id'))->grand_total}}',
|
||||
cur: '{{\App\Models\Currency::findOrFail(get_setting('system_default_currency'))->code}}',
|
||||
merchant_ref: 'ref123',
|
||||
memo: 'Payment for shirt',
|
||||
developer_code: '5a61be72ab323',
|
||||
store_id: 1,
|
||||
loadText:'Custom load text',
|
||||
|
||||
customer: {
|
||||
name: '{{ Session::get('shipping_info')['name'] }}',
|
||||
address: '{{ Session::get('shipping_info')['address'] }}',
|
||||
city: '{{ Session::get('shipping_info')['city'] }}',
|
||||
state: 'Customer state',
|
||||
zipcode: '{{ Session::get('shipping_info')['postal_code'] }}',
|
||||
email: '{{ Session::get('shipping_info')['email'] }}',
|
||||
phone: '{{ Session::get('shipping_info')['phone'] }}'
|
||||
},
|
||||
closed:closedFunction,
|
||||
success:successFunction,
|
||||
failed:failedFunction
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,49 @@
|
||||
<script src="//pay.voguepay.com/js/voguepay.js"></script>
|
||||
|
||||
<script>
|
||||
closedFunction=function() {
|
||||
alert('window closed');
|
||||
location.href = '{{ env('APP_URL') }}'
|
||||
}
|
||||
|
||||
successFunction=function(transaction_id) {
|
||||
location.href = '{{ env('APP_URL') }}'+'/vogue-pay/success/'+transaction_id
|
||||
}
|
||||
failedFunction=function(transaction_id) {
|
||||
location.href = '{{ env('APP_URL') }}'+'/vogue-pay/success/'+transaction_id
|
||||
}
|
||||
</script>
|
||||
@if (get_setting('voguepay_sandbox') == 1)
|
||||
<input type="hidden" id="merchant_id" name="v_merchant_id" value="demo">
|
||||
@else
|
||||
<input type="hidden" id="merchant_id" name="v_merchant_id" value="{{ env('VOGUE_MERCHANT_ID') }}">
|
||||
@endif
|
||||
@php
|
||||
$customer_package = \App\Models\CustomerPackage::findOrFail(Session::get('payment_data')['customer_package_id']);
|
||||
@endphp
|
||||
|
||||
<script>
|
||||
|
||||
window.onload = function(){
|
||||
pay3();
|
||||
}
|
||||
|
||||
function pay3() {
|
||||
Voguepay.init({
|
||||
v_merchant_id: document.getElementById("merchant_id").value,
|
||||
total: '{{ $customer_package->amount }}',
|
||||
cur: '{{\App\Models\Currency::findOrFail(get_setting('system_default_currency'))->first()->value)->code}}',
|
||||
merchant_ref: 'ref123',
|
||||
loadText:'Custom load text',
|
||||
customer: {
|
||||
name: '{{ Auth::user()->name }}',
|
||||
|
||||
email: '{{ Auth::user()->email }}',
|
||||
phone: '{{ Auth::user()->phone }}'
|
||||
},
|
||||
closed:closedFunction,
|
||||
success:successFunction,
|
||||
failed:failedFunction
|
||||
});
|
||||
}
|
||||
</script>
|
||||
BIN
resources/views/frontend/voguepay/desktop.ini
Normal file
BIN
resources/views/frontend/voguepay/desktop.ini
Normal file
Binary file not shown.
@@ -0,0 +1,46 @@
|
||||
<script src="//pay.voguepay.com/js/voguepay.js"></script>
|
||||
|
||||
<script>
|
||||
closedFunction=function() {
|
||||
alert('window closed');
|
||||
location.href = '{{ env('APP_URL') }}'
|
||||
}
|
||||
|
||||
successFunction=function(transaction_id) {
|
||||
location.href = '{{ env('APP_URL') }}'+'/vogue-pay/success/'+transaction_id
|
||||
}
|
||||
failedFunction=function(transaction_id) {
|
||||
location.href = '{{ env('APP_URL') }}'+'/vogue-pay/success/'+transaction_id
|
||||
}
|
||||
</script>
|
||||
@if (get_setting('voguepay_sandbox') == 1)
|
||||
<input type="hidden" id="merchant_id" name="v_merchant_id" value="demo">
|
||||
@else
|
||||
<input type="hidden" id="merchant_id" name="v_merchant_id" value="{{ env('VOGUE_MERCHANT_ID') }}">
|
||||
@endif
|
||||
|
||||
<script>
|
||||
|
||||
window.onload = function(){
|
||||
pay3();
|
||||
}
|
||||
|
||||
function pay3() {
|
||||
Voguepay.init({
|
||||
v_merchant_id: document.getElementById("merchant_id").value,
|
||||
total: '{{ Session::get('payment_data')['amount'] }}',
|
||||
cur: '{{\App\Models\Currency::findOrFail(get_setting('system_default_currency'))->code}}',
|
||||
merchant_ref: 'ref123',
|
||||
loadText:'Custom load text',
|
||||
customer: {
|
||||
name: '{{ Auth::user()->name }}',
|
||||
|
||||
email: '{{ Auth::user()->email }}',
|
||||
phone: '{{ Auth::user()->phone }}'
|
||||
},
|
||||
closed:closedFunction,
|
||||
success:successFunction,
|
||||
failed:failedFunction
|
||||
});
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user