@@ -302,5 +302,221 @@ class BaseEndpointTestCase(unittest.TestCase):
302
302
"country" : "CA" ,
303
303
"postal_code" : "T4N 0B8"
304
304
}
305
+ }
306
+
307
+ checkout_object = {
308
+ "name" : "Payment Link Name" ,
309
+ "type" : "PaymentLink" ,
310
+ "recurrent" : False ,
311
+ "expired_at" : 1590882634 ,
312
+ "allowed_payment_methods" : ["cash" , "card" , "bank_transfer" ],
313
+ "needs_shipping_contact" : True ,
314
+ "monthly_installments_enabled" : False ,
315
+ "monthly_installments_options" : [3 , 6 , 9 , 12 ],
316
+ "order_template" : {
317
+ "line_items" : [{
318
+ "name" : "Red Wine" ,
319
+ "unit_price" : 1000 ,
320
+ "quantity" : 10
321
+ }],
322
+ "currency" : "MXN" ,
323
+ "customer_info" : {
324
+ "name" : "Juan Perez" ,
325
+
326
+ "phone" : "5566982090"
327
+ }
328
+ }
329
+ }
330
+
331
+ checkout_object_multiple = {
332
+ "name" : "Payment Link Name" ,
333
+ "type" : "PaymentLink" ,
334
+ "recurrent" : True ,
335
+ "expired_at" : 1590882634 ,
336
+ "allowed_payment_methods" : ["cash" , "card" , "bank_transfer" ],
337
+ "needs_shipping_contact" : True ,
338
+ "monthly_installments_enabled" : False ,
339
+ "monthly_installments_options" : [3 , 6 , 9 , 12 ],
340
+ "order_template" : {
341
+ "line_items" : [{
342
+ "name" : "Red Wine" ,
343
+ "unit_price" : 1000 ,
344
+ "quantity" : 10
345
+ }],
346
+ "currency" : "MXN" ,
347
+ "customer_info" : {
348
+ "name" : "Juan Perez" ,
349
+
350
+ "phone" : "5566982090"
351
+ }
352
+ }
353
+ }
354
+
355
+ checkout_object_msi = {
356
+ "name" : "Payment Link Name" ,
357
+ "type" : "PaymentLink" ,
358
+ "recurrent" : True ,
359
+ "expired_at" : 1590882634 ,
360
+ "allowed_payment_methods" : ["cash" , "card" , "bank_transfer" ],
361
+ "needs_shipping_contact" : True ,
362
+ "monthly_installments_enabled" : True ,
363
+ "monthly_installments_options" : [3 , 6 , 9 , 12 ],
364
+ "order_template" : {
365
+ "line_items" : [{
366
+ "name" : "Red Wine" ,
367
+ "unit_price" : 1000 ,
368
+ "quantity" : 10
369
+ }],
370
+ "currency" : "MXN" ,
371
+ "customer_info" : {
372
+ "name" : "Juan Perez" ,
373
+
374
+ "phone" : "5566982090"
375
+ }
376
+ }
377
+ }
305
378
379
+ checkout_object_type_checkout = {
380
+ "name" : "Payment Link Name" ,
381
+ "type" : "checkout" ,
382
+ "recurrent" : True ,
383
+ "expired_at" : 1590882634 ,
384
+ "allowed_payment_methods" : ["cash" , "card" , "bank_transfer" ],
385
+ "needs_shipping_contact" : True ,
386
+ "monthly_installments_enabled" : True ,
387
+ "monthly_installments_options" : [3 , 6 , 9 , 12 ],
388
+ "order_template" : {
389
+ "line_items" : [{
390
+ "name" : "Red Wine" ,
391
+ "unit_price" : 1000 ,
392
+ "quantity" : 10
393
+ }],
394
+ "currency" : "MXN" ,
395
+ "customer_info" : {
396
+ "name" : "Juan Perez" ,
397
+
398
+ "phone" : "5566982090"
399
+ }
400
+ }
306
401
}
402
+
403
+ checkout_object_send = {
404
+ "id" : "05b25724-df59-4925-8762-105d627875fd"
405
+ "name" : "Payment Link Name" ,
406
+ "type" : "checkout" ,
407
+ "recurrent" : True ,
408
+ "expired_at" : 1590882634 ,
409
+ "allowed_payment_methods" : ["cash" , "card" , "bank_transfer" ],
410
+ "needs_shipping_contact" : True ,
411
+ "monthly_installments_enabled" : True ,
412
+ "monthly_installments_options" : [3 , 6 , 9 , 12 ],
413
+ "order_template" : {
414
+ "line_items" : [{
415
+ "name" : "Red Wine" ,
416
+ "unit_price" : 1000 ,
417
+ "quantity" : 10
418
+ }],
419
+ "currency" : "MXN" ,
420
+ "customer_info" : {
421
+ "name" : "Juan Perez" ,
422
+
423
+ "phone" : "5566982090"
424
+ }
425
+ }
426
+ }
427
+
428
+
429
+ checkout_order_object =
430
+ "currency" : "MXN" ,
431
+ "customer_info" : {
432
+ "customer_id" : "cus_2o3FvMEBiKitVK1vQ"
433
+ },
434
+ "line_items" : [{
435
+ "name" : "Box of Cohiba S1s" ,
436
+ "unit_price" : 300000 ,
437
+ "quantity" : 1
438
+ }],
439
+ "shipping_lines" : [{
440
+ "amount" : 0
441
+ }],
442
+ "checkout" : {
443
+ "allowed_payment_methods" : ["cash" , "card" , "bank_transfer" ],
444
+ "multifactor_authentication" : False ,
445
+ "monthly_installments_enabled" : False ,
446
+ "monthly_installments_options" : [3 ,6 ,9 ,12 ,18 ],
447
+ "expires_at" : 1609891200
448
+ },
449
+ "shipping_contact" : {
450
+ "phone" : "+5215555555555" ,
451
+ "receiver" : "Marvin Fuller" ,
452
+ "address" : {
453
+ "street1" : "Nuevo Leon 4" ,
454
+ "country" : "MX" ,
455
+ "postal_code" : "06100"
456
+ }
457
+ }
458
+
459
+ checkout_msi_order__object =
460
+ "currency" : "MXN" ,
461
+ "customer_info" : {
462
+ "customer_id" : "cus_2o3FvMEBiKitVK1vQ"
463
+ },
464
+ "line_items" : [{
465
+ "name" : "Box of Cohiba S1s" ,
466
+ "unit_price" : 300000 ,
467
+ "quantity" : 1
468
+ }],
469
+ "shipping_lines" : [{
470
+ "amount" : 0
471
+ }],
472
+ "checkout" : {
473
+ "type" :"Integration" ,
474
+ "allowed_payment_methods" : ["cash" , "card" , "bank_transfer" ],
475
+ "multifactor_authentication" : False ,
476
+ "monthly_installments_enabled" : True ,
477
+ "monthly_installments_options" : [3 ,6 ,9 ,12 ,18 ],
478
+ "expires_at" : 1609891200
479
+ },
480
+ "shipping_contact" : {
481
+ "phone" : "+5215555555555" ,
482
+ "receiver" : "Marvin Fuller" ,
483
+ "address" : {
484
+ "street1" : "Nuevo Leon 4" ,
485
+ "country" : "MX" ,
486
+ "postal_code" : "06100"
487
+ }
488
+ }
489
+
490
+
491
+ checkout_order__redirect_object =
492
+ "currency" : "MXN" ,
493
+ "customer_info" : {
494
+ "customer_id" : "cus_2o3FvMEBiKitVK1vQ"
495
+ },
496
+ "line_items" : [{
497
+ "name" : "Box of Cohiba S1s" ,
498
+ "unit_price" : 300000 ,
499
+ "quantity" : 1
500
+ }],
501
+ "shipping_lines" : [{
502
+ "amount" : 0
503
+ }],
504
+ "checkout" : {
505
+ "type" :"HostedPayment" ,
506
+ "success_url" : "testredirect.com" ,
507
+ "failure_url" : "testredirect.com" ,
508
+ "allowed_payment_methods" : ["cash" , "card" , "bank_transfer" ],
509
+ "multifactor_authentication" : False ,
510
+ "monthly_installments_enabled" : False ,
511
+ "monthly_installments_options" : [3 ,6 ,9 ,12 ,18 ],
512
+ "expires_at" : 1609891200
513
+ },
514
+ "shipping_contact" : {
515
+ "phone" : "+5215555555555" ,
516
+ "receiver" : "Marvin Fuller" ,
517
+ "address" : {
518
+ "street1" : "Nuevo Leon 4" ,
519
+ "country" : "MX" ,
520
+ "postal_code" : "06100"
521
+ }
522
+ }
0 commit comments