This file contains hidden or 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 snippet could be used to verify PayPal webhooks | |
PayPal docs isn't very clear about API verification mechanism. And am afraid neither | |
is the SDK. | |
BASIC CONCEPT: Your webhook_event in the body of verification request be in the same | |
order you have received from PayPal or else your verification fails. | |
EXTRA TIP IF USING DRF: Don't use request.DATA as it mutates the order of the request |
This file contains hidden or 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
[ | |
{ | |
"province": "اردبیل", | |
"cities": [ | |
"اردبیل", | |
"اصلاندوز", | |
"آبی بیگلو", | |
"بیله سوار", | |
"پارس آباد", | |
"تازه کند", |
This file contains hidden or 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
<?php | |
/** | |
* simple method to encrypt or decrypt a plain text string | |
* initialization vector(IV) has to be the same when encrypting and decrypting | |
* | |
* @param string $action: can be 'encrypt' or 'decrypt' | |
* @param string $string: string to encrypt or decrypt | |
* | |
* @return string | |
*/ |