Skip to content

Instantly share code, notes, and snippets.

View kenzotenma016's full-sized avatar

kenzotenma016

View GitHub Profile
@swport
swport / woocommerce_payment_process_rest.php
Last active June 25, 2023 06:31
WordPress Rest API endpoint to process payments via WC
<?php
/*
* Suitable for NON-HOSTED payment gateways wallets, funds, etc.
*
* You can also process HOSTED payment gateways like paypal, but you'll get a rediect URL at the end
* and you have to handle that depending on what client (android, ios) you're catering to.
* You can have the redirect URL open up in a web-view-client and collect payment.
*
**/
@incredimike
incredimike / variousCountryListFormats.js
Last active April 30, 2024 11:10
List of Countries in various Javascript data structures: Alphabetical country lists & Country data objects.
// Lists of countries with ISO 3166 codes, presented in various formats.
// Last Updated: July 30, 2020
// If you're using PHP, I suggest checking out:
// https://github.com/thephpleague/iso3166
// or Laravel: https://github.com/squirephp/squire
//
// JS developers can check out:
// https://www.npmjs.com/package/iso3166-2-db
//