-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from ahmedsaoud31/master
Use blade as html verification templates
- Loading branch information
Showing
8 changed files
with
133 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<link rel='stylesheet' href="https://atfawry.fawrystaging.com/atfawry/plugin/assets/payments/css/fawrypay-payments.css"> | ||
<script type='text/javascript' src="{{ $data['fawry_url'] }}atfawry/plugin/assets/payments/js/fawrypay-payments.js"></script> | ||
<script> | ||
const chargeRequest = {}; | ||
chargeRequest.language= "ar-eg"; | ||
chargeRequest.merchantCode= "{{ $data['fawry_merchant'] }}"; | ||
chargeRequest.merchantRefNumber= "{{ $data['payment_id'] }}"; | ||
chargeRequest.customer = {}; | ||
chargeRequest.customer.name = "{{ $data['user_name'] }}"; | ||
chargeRequest.customer.mobile = "{{ $data['user_phone'] }}"; | ||
chargeRequest.customer.email = "{{ $data['user_email'] }}"; | ||
chargeRequest.customer.customerProfileId = "{{ $data['user_id'] }}"; | ||
chargeRequest.order = {}; | ||
chargeRequest.order.description = "Credit"; | ||
chargeRequest.order.expiry = ''; | ||
chargeRequest.order.orderItems = []; | ||
const item = {}; | ||
item.productSKU = 1; | ||
item.description = 'Credit'; | ||
item.price = "{{ $data['amount'] }}"; | ||
item.quantity = "{{ $data['item_quantity'] }}"; | ||
chargeRequest.order.orderItems.push(item); | ||
chargeRequest.signature = "{{ $data['secret'] }}"; | ||
setTimeout(function(){ | ||
FawryPay.checkout(chargeRequest,'{{ route($model->verify_route_name, ["payment" => "fawry"]) }}', '{{ route($model->verify_route_name, ["payment" => "fawry"]) }}'); | ||
},100); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<form action="{{ route($model->verify_route_name, ['payment' => 'hyperpay']) }}" class='paymentWidgets' data-brands="{{ $brand }}"></form> | ||
<script src="{{ $model->hyperpay_base_url }}"/v1/paymentWidgets.js?checkoutId="{{ $model->payment_id }}"></script> | ||
<script type='text/javascript'> | ||
const subTotalAmount = parseFloat({{ $model->amount }}); | ||
const shippingAmount = 0; | ||
const taxAmount = 0; | ||
const currency = "{{ $model->currency }}"; | ||
const applePayTotalLabel = "{{ $model->app_name }}"; | ||
function getAmount() { | ||
return ((subTotalAmount + shippingAmount + taxAmount)).toFixed(2); | ||
} | ||
function getLineItems() { | ||
return [{ | ||
label: 'Subtotal', | ||
amount: (subTotalAmount).toFixed(2) | ||
}, { | ||
label: 'Shipping', | ||
amount: (shippingAmount).toFixed(2) | ||
}, { | ||
label: 'Tax', | ||
amount: (taxAmount).toFixed(2) | ||
}]; | ||
} | ||
const wpwlOptions = { | ||
applePay: { | ||
displayName: "{{ $model->app_name }}", | ||
total: { | ||
label: "{{ $model->app_name }}" | ||
}, | ||
paymentTarget:'_top', | ||
merchantCapabilities: ['supports3DS'], | ||
supportedNetworks: ['mada','masterCard', 'visa' ], | ||
supportedCountries: ['SA'], | ||
} | ||
}; | ||
wpwlOptions.createCheckout = function() { | ||
return $.post("{{ route($model->verify_route_name, ['payment' => 'hyperpay']) }}") | ||
.then(function(response) { | ||
return response.checkoutId; | ||
}); | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<body> | ||
<script id="kashier-iFrame" | ||
src="{{ $model->kashier_url }}/kashier-checkout.js" | ||
data-amount="{{ $model->amount }}" | ||
data-description="Credit" | ||
data-mode="{{ $model->kashier_mode }}" | ||
data-hash="{{ $data['hash'] }}" | ||
data-currency="{{ $data['currency'] " | ||
data-orderId="{{ $data['order_id'] " | ||
data-allowedMethods="card" | ||
data-merchantId="{{ $data['mid'] }}" | ||
data-merchantRedirect="{{ $data['redirect_back'] }}" | ||
data-store="{{ $model->app_name }}" | ||
data-type="external" data-display="ar"> | ||
</script> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters