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
// | |
// ViewController.swift | |
// midtrans-snap-WebView-sample | |
// | |
import UIKit | |
import WebKit | |
class ViewController: UIViewController, WKNavigationDelegate, WKUIDelegate { | |
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
#!/usr/bin/php | |
<?php | |
/** | |
* Copyright © 2015 Magento. All rights reserved. | |
* See https://github.com/magento/magento2/blob/develop/COPYING.txt for license details. | |
*/ | |
/** | |
* validate_m2_package.php - a script that checks a given M2 zip package to ensure | |
* it is structured correctly and has all the required files. |
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 redirect.php file on app/code/Midtrans/Snap/Controller/Redirect.php | |
if ($quote->getBaseCustomerBalanceAmount() != 0) { | |
$balancAmount = array( | |
'id' => 'STORE CREDIT', | |
'price' => round($quote->getBaseCustomerBalanceAmount() * -1), | |
'quantity' => 1, | |
'name' => 'STORE CREDIT' | |
); | |
$item_details[] = $balancAmount; |
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
package com.midtrans.demo; | |
import androidx.appcompat.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.widget.Button; | |
import com.midtrans.sdk.corekit.callback.TransactionFinishedCallback; | |
import com.midtrans.sdk.corekit.core.MidtransSDK; |
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
public class MainActivity extends AppCompatActivity { | |
private Button btnPayment; | |
private MidtransSDK midtransSDK; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); |